SECURITYHIGHCVE-2026-137197

CVE-2026-137197: cross-spawn Windows Argument Injection via cmd.exe (CVSS 8.1)

cross-spawn before 6.0.8 and 7.1.1 on Windows can be abused through untrusted arguments when a command routed via cmd.exe is not a plain program name.

Dylan H.

Security Team

December 1, 2026
2 min read
CVE-2026-137197: cross-spawn Windows Argument Injection via cmd.exe (CVSS 8.1)

Affected Products

  • cross-spawn before 6.0.8 and 7.1.1 (Windows)

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.

BranchFixed in
6.x6.0.8
7.x7.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.

  1. Find installed copies with npm ls cross-spawn on Windows build hosts and servers.
  2. Update to 6.0.8 or 7.1.1 or later, using overrides or resolutions where a parent package pins an older version.
  3. Avoid passing untrusted input as command names or arguments, and validate it against an allowlist.
  4. Prefer execFile-style calls with a fixed program path and no shell where possible.

References