Live › vulnerability › VND-nodejs-april-2024-security-releases-2
Go to dashboardOn Windows, child_process.spawn and spawnSync mishandle .bat and .cmd files, so a crafted command line argument can inject and run arbitrary commands even when the shell option is off. Node.js now throws EINVAL for batch files passed without shell set, which can break existing code.
Summary written from the sources below. Check the originals before acting.
First seen by InfraStack 2026-10-23 19:13 UTC. All times on this page are UTC.
Windows users of Node.js 18.x, 20.x and 21.x who call child_process.spawn or child_process.spawnSync with arguments that can carry attacker-controlled text. The sources state the flaw affects all Windows users on those release lines. Non-Windows systems are not described as affected.
| Product | Ecosystem | Affected | Fixed in |
|---|---|---|---|
| node | node | – | – |
| node | node | 18.x | – |
| node | node | 20.x | – |
| node | node | 21.x | – |
node --version and compare against the fixed releases listed in the Fix field.child_process.spawn and child_process.spawnSync calls that run .bat or .cmd files or pass user-controlled arguments on Windows.{ shell: true } to avoid the new EINVAL error.--security-revert=CVE-2024-27980.Each row is the first time that source carried this signal. The analyst’s rows are its own findings.
Commercial support for versions past the Maintenance LTS phase is available through our OpenJS Ecosystem Sustainability Program partners Wednesday, April 10, 2024 Security Releases RG Rafael Gonzaga Wednesday, April 10, 2024 Security Releases Security releases available Updates are now available for the 18.x, 20.x, 21.x Node.js release lines for the following issues. Command injection via args parameter of child_process.spawn without shell option enabled on Windows (CVE-2024-27980) - (HIGH) Due to the improper handling of batch files in child_process.spawn / child_process.spawnSync, a malicious command line argument can inject arbitrary commands and achieve code execution even if the shell option is not enabled. It is important to note that there has been a breaking change for Windows users who utilize child_process.spawn and child_process.spawnSync . Node.js will now error with EINVAL if a .bat or .cmd file is passed to child_process.spawn and child_process.spawnSync without the shell option set. If the input to spawn / spawnSync is sanitized, users can now pass { shell: true } as an option to prevent the occurrence of EINVALs errors. While it is possible to also pass --security-revert=CVE-2024-27980 to revert the security patch, we strongly advise against doing so. Impact: This vulnerability affects all Windows users in active release lines: 18.x, 20.x, 21.x Thank you, to ryotak for reporting this vulnerability and thank you Ben Noordhuis for fixing it. Summary The Node.js project will release new versions of the 18.x, 20.x, 21.x releases lines on or shortly after, Tuesday, April 9, 2024 in order to address: 1 high severity issues. Impact The 18.x release line of Node.js is vulnerable to 1 high severity issue. The 20.x release line of Node.js is vulnerable to 1 high severity issue. The 21.x release line of Node.js is vulnerable to 1 high severity issue. Release timing Releases will be available on, or shortly after, Tuesday, April 9, 2024. Contact and future updates The current Node.js security policy can be found at https://nodejs.org/en/security/ . Please follow the process outlined in https://github.com/nodejs/node/blob/master/SECURITY.md if you wish to report a vulnerability in Node.js. Subscribe to the low-volume announcement-only nodejs-sec mailing list at https://groups.google.com/forum/#!forum/nodejs-sec to stay up to date on security vulnerabilities and security-related releases of Node.js and the projects maintained in the nodejs GitHub organization. Previous Monday, July 8, 2024 Security Releases Next Wednesday, April 3, 2024 Security Releases
This page as .md · .json · in your agent: get_signal("VND-nodejs-april-2024-security-releases-2")