Updates are now available for the 18.x, 20.x, 21.x Node.js release lines for the following issues.
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:
Thank you, to ryotak for reporting this vulnerability and thank you Ben Noordhuis for fixing it.
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:
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.
Releases will be available on, or shortly after, Tuesday, April 9, 2024.