node-cross-spawn command injection on Windows
CVE-2026-137197
Windows programs built with Node.js can be hacked.
- CVE
- CVE-2026-137197 (opens in a new tab)
- Score
- CVSS 8.1
- First seen
Mitigation
Update 7.x to 7.1.1 or later, and 6.x to 6.0.8 or later. Versions before 6.0.0 are unmaintained and will not be fixed, so move to a newer line. Until then, pass the program and its arguments separately in the args array, and do not set PATHEXT in options.env.
Update to at least the version for your product:
- node-cross-spawn 7.x 7.1.1 or later
- node-cross-spawn 6.x 6.0.8 or later
Summary
The cross-spawn package for Node.js mis-escapes arguments when certain command forms on Windows are run through cmd.exe. Windows programs that pass untrusted input as arguments can have arbitrary commands executed.
Affected when
- Runs on Windows
- Command is not a plain program name or path (contains quotes, spaces, tabs, commas, semicolons or equals signs, trailing whitespace, or a child-specific PATHEXT)
- Untrusted input passed as arguments
2 other Incidents of this product in the last 30 days
Incidents by product: node-cross-spawn
Other recent Incidents of node-cross-spawn
Read the advisory · github.com (opens in a new tab)
- Advisory: github.com (opens in a new tab)
- CVE record: cve.org (opens in a new tab)