Node.js exposes a high-severity vulnerability, CVE-2024-27980, posing a significant threat to Windows platforms. This flaw allows attackers to execute arbitrary commands, bypassing safety mechanisms within the child_process.spawn functions. The vulnerability affects multiple active release lines (18.x, 20.x, 21.x) of Node.js on Windows, prompting the project to swiftly release security updates to mitigate the risk.
Discovered by security researcher Ryotak and addressed by Ben Noordhuis, the flaw arises from the mishandling of batch files and command-line arguments within the child_process.spawn functions. Despite not enabling the shell option, a maliciously crafted command-line argument can still lead to command injection and arbitrary code execution. This circumvention of safety mechanisms heightens the urgency for users to update their Node.js installations immediately to protect against potential exploitation.
In response to the discovery, the Node.js project has expressed gratitude to community members for their contributions to maintaining platform security. Recommendations advise Node.js users, particularly those on Windows, to promptly update to the latest patched versions, re-evaluate child process usage in applications, and stay informed about security updates through the nodejs-sec mailing list and official Node.js security page.
Given the widespread impact of the vulnerability across active release lines, the rapid dissemination of security updates underscores the project’s commitment to ensuring the security and integrity of the Node.js ecosystem. This proactive approach aims to mitigate the risk posed by CVE-2024-27980 and underscores the importance of timely updates and security best practices in safeguarding against potential threats.