News

20,000 GitHub projects at risk from Node.js ‘standard-version’ library vulnerability

More than 20,000 GitHub projects rely on the Node.js standard-version utility to implement semantic versioning (semver) and for generating CHANGELOG files for their builds.

A Proof-of-Concept (PoC) published by the GitHub Security Labs team this month reveals the presence of a code injection flaw in standard-versions, which means developers using this library could have inadvertently introduced vulnerabilities in their components.

“The standardVersion function has a command injection vulnerability. Clients of the standard-version library are unlikely to be aware of this, so they might unwittingly write code that contains a vulnerability,” read GitHub’s original PoC advisory.

Dubbed GHSL-2020-111 for lack of CVE, the flaw resides in the fact how commit messages are passed onto the `runExec` function. When passing user-controllable arguments, such as “releaseCommitMessageFormat”, arbitrary code can be injected and passed right into `runExec`, leading to command execution.

The vulnerable code with the runExec call using releaseCommitMessageFormat argument / via GitHub

GitHub considers this vulnerability carrying a “moderate” severity. Their spokesperson told The Daily Swig, “It is hard to create a complete exploit for this vulnerability because it is a library function that is vulnerable. A complete exploit requires that some client uses that specific library function with user-controlled inputs.”

And yes, they are correct. However, the severity of code injection vulnerabilities really depends on the context and how a vulnerable application is being used in the developer’s environment. 

Should a user-supplied input be passed to “standard-version” without much friction or checks in between, there is potential for some serious compromise.

Users and developers using standard-version are advised to upgrade to version 8.0.1 or above to mitigate this vulnerability.

To fix the flaw, the project has replaced calls to runExec with a more secure runExecFile command and added additional validations to the code.

Fix replaces runExec calls with runExecFile

The same GitHub advisory also published a list of CVEs and vulnerabilities similar to this one, as identified in other JS libraries:
CVE-2020-7646,
CVE-2020-7614,
CVE-2020-7597,
CVE-2019-10778,
CVE-2019-10776,
CVE-2018-16462,
CVE-2018-16461,
CVE-2018-16460,
CVE-2018-13797,
CVE-2018-3786,
CVE-2018-3772,
CVE-2018-3746,
CVE-2017-16100,
CVE-2017-16042.

“We have written a CodeQL query, which automatically detects this vulnerability. You can see the results of the query on the standard-version project here,” read the advisory.

Given the wide potential for use and abuse of open source components, developers are encouraged to stay on top of these security advisories and implement fixes as they are released, in their applications.

Ax Sharma

Ax Sharma is a UK-based security researcher, journalist and TV subject matter expert experienced in malware analysis and cybercrime investigations. His areas of interest include open source software security and threat intel analysis. Frequently featured by leading media outlets like the BBC, Channel 5, Fortune, WIRED, The Register, among others, Ax is an active community member of the OWASP Foundation and the British Association of Journalists (BAJ).

Recent Posts

Security firm accuses rival of “stealing” its research, backdating blogs

Same vulnerability. Different story. A security firm, FuzzingLabs is accusing a rival (Gecko Security) of…

5 days ago

ParkMobile’s $32.8 Million Data Breach Settlement = You get $1?

In 2021, parking app ParkMobile suffered a massive data breach impacting 22 million users whose…

2 weeks ago

8 Brutal Truths About Cybersecurity I Wish I Knew

When I first got into cybersecurity, I thought it was all about hackers in hoodies…

2 weeks ago

US Air Force Probes Potential SharePoint-Linked Privacy Breach

The US Air Force is investigating a “privacy-related issue” that may have exposed personally identifiable…

3 weeks ago

Harrods third-party breach exposes 430,000 customer records, hackers reach out

London’s iconic department store Harrods has disclosed that approximately 430,000 customer records were compromised in…

3 weeks ago

WestJet confirms customer ID, passports stolen in June cyberattack

WestJet confirmed that in a June 2025 cybersecurity incident, a “sophisticated, criminal third party” gained…

3 weeks ago

This website uses cookies.