Summary
CVE-2026-137197 is a command-injection weakness in cross-spawn, the widely used cross-platform wrapper around Node.js spawn and spawnSync. NVD published it on November 30, 2026 with a CVSS score of 8.1. Only the NVD description was available to us, so exploit status and vendor advisory details are unverified.
Details
Per the NVD description, applications running on Windows that pass untrusted arguments to cross-spawn can be vulnerable when the command sent through cmd.exe is not written as a plain program name or path. Commands that contain quotes or similar shell-significant characters are the risky case. The flaw does not affect other platforms according to the record.
| Branch | Fixed in |
|---|---|
| 6.x | 6.0.8 |
| 7.x | 7.1.1 |
Because cross-spawn is a very common transitive dependency, many Windows-hosted Node tools, build scripts and CLIs may pull it in without listing it directly.
Impact
An attacker who controls an argument passed to a vulnerable call could change what cmd.exe runs, leading to arbitrary command execution in the context of the Node.js process. Exposure depends on whether your code or a dependency forwards untrusted input.
Recommended actions
- Find installed copies with
npm ls cross-spawnon Windows build hosts and servers. - Update to 6.0.8 or 7.1.1 or later, using overrides or resolutions where a parent package pins an older version.
- Avoid passing untrusted input as command names or arguments, and validate it against an allowlist.
- Prefer
execFile-style calls with a fixed program path and no shell where possible.