NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
HIGH severity

CVE-2026-137197 — cross-spawn

HIGHFix: moxystudio/node-cross-spawn@4a15965

CVE-2026-137197 is a high-severity (CVSS 8.1) OS Command Injection vulnerability in cross-spawn. A fix is available for cross-spawn — see the affected versions and patch details below.

cross-spawn: Command injection on Windows when the command is not a plain program name or path

Also known asGHSA-w3gc-668g-rf8f
Published
Updated
Affected
2 pkgs
Patched
2 / 2
Exploits
None indexed
Exploitation data as of Dec 4, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • A successful exploit gives an attacker total control of the affected component, not partial access.
  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for CVE-2026-137197.

EPSS Exploitation Probability

via FIRST.org ↗
0.8%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs59th percentile — riskier than 59% of all scored CVEsHighest risk
0.32%0.66%0.99%1.32%0.8%0.8%Dec 26Dec 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

2 pkgs affected
📦cross-spawn📦cross-spawn

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects npm packages — download data is not available via public APIs for these ecosystems.

Description

Impact

On Windows, cross-spawn runs commands that aren't executables, such as batch files (.bat and .cmd), through cmd.exe, and escapes their arguments for it. Batch files need a stricter escaping, because cmd.exe parses their arguments a second time. 7.1.0 and 6.0.7 fixed that escaping (GHSA-ghv9-86vm-4v8m), but it only applies when cross-spawn detects that the command is a batch file.

The detection could be bypassed when the command isn't written as a plain program name or path, while cmd.exe still runs a batch file:

  • the command contains double quotes, e.g. spawn('"tool.bat"', args) or spawn('"tool"', args);
  • the command contains a space, tab, ,, ; or =, where cmd.exe ends the command name, e.g. spawn('npm install', args), which runs npm.cmd;
  • the command ends with a tab or other whitespace;
  • the PATHEXT passed in options.env makes cmd.exe find a batch file that the parent's PATHEXT doesn't.

In those cases the arguments were escaped for a regular program, and an argument such as "&calc could run arbitrary commands.

Applications are affected if they run on Windows, pass a command in one of these forms, and pass untrusted input as arguments.

Patches

Fixed in 7.1.1 and 6.0.8. The command is now always quoted when it runs through cmd.exe, so cmd.exe treats it as a single name. Double quotes are removed from it first, since Windows file names can't contain them, and it's looked up with the child's PATHEXT. As a consequence, the command must be the name or path of a single program, as documented: spawn('npm install') now fails with ENOENT, like on other platforms.

Versions before 6.0.0 are not maintained and won't be fixed. Upgrade to 7.1.1, or force it with overrides in package.json.

Workarounds

Pass the program as the command and its arguments in args, without quotes, e.g. spawn('npm', ['install', ...]), and don't set PATHEXT in options.env.

Affected Packages

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
📦npmcross-spawn≥ 7.0.0&&< 7.1.17.1.1npm install cross-spawn@7.1.1
📦npmcross-spawnall versions6.0.8npm install cross-spawn@6.0.8

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for cross-spawn, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update cross-spawn to 7.1.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-137197 is resolved across your whole dependency graph.

  3. Workarounds

    Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.

Frequently Asked Questions

### Impact On Windows, cross-spawn runs commands that aren't executables, such as batch files (`.bat` and `.cmd`), through `cmd.exe`, and escapes their arguments for it. Batch files need a stricter escaping, because `cmd.exe` parses their arguments a second time. 7.1.0 and 6.0.7 fixed that escaping ([GHSA-ghv9-86vm-4v8m](https://github.com/moxystudio/node-cross-spawn/security/advisories/GHSA-ghv9-86vm-4v8m)), but it only applies when cross-spawn detects that the command is a batch file. The detection could be bypassed when the command isn't written as a plain program name or path, while `cmd
O3 Security · Impact-Aware SCA

Is CVE-2026-137197 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2026-137197: cross-spawn — Fixed in 7.1.1