Skip to main content
Menu
CVEs

node-cross-spawn command injection in batch file spawning on Windows

Affects node-cross-spawn on Windows when applications pass untrusted input as arguments to commands, such as batch files, that run through cmd.exe. Fixed in 6.0.7 and 7.1.0.

CVE-2026-137199Published November 30, 2026, updated

9.2CriticalCNA
Exploited
No known exploitation
Fix
Fixed in 6.0.7, 7.1.0
Who is exposed
Not reported

Summary

The node-cross-spawn package from moxystudio has a command injection flaw on Windows when it spawns batch files. An attacker can remotely, without logging in or any user action, send a crafted argument that breaks out of its quotes and runs arbitrary commands.

Written by a model

Original description

cross-spawn is a cross-platform solution for Node.js spawn and spawnSync. Prior to 6.0.7 and 7.1.0, Windows applications that pass untrusted arguments to commands routed through cmd.exe can be vulnerable because cross-spawn did not account for the second cmd.exe parse performed when a batch file outside node_modules/.bin forwards its arguments. A crafted argument could break out of its quotes and execute arbitrary commands through npm.cmd, globally installed package shims, or user batch files. Trailing dots or spaces could bypass batch-file detection. A percent-delimited variable in an argument could be expanded when an environment variable with the same name followed by a caret existed, and an exclamation-delimited variable could be expanded when delayed expansion was enabled in the registry. Other platforms and the intentionally unescaped options.shell mode are not affected. This issue is fixed in versions 6.0.7 and 7.1.0.

Who should check

Windows teams running Node.js code that passes untrusted input as arguments to npm.cmd, batch files or global package shims via cross-spawn

Not fixed by: Batch files using %~1 unquoted stay unsafe even after upgrading.

“Applications are affected if they pass untrusted input as arguments to a command that runs through cmd.exe on Windows”

github.com

What to do

Upgrade to a fixed version: 6.0.7, 7.1.0.

Check your systems with an agent

Paste this into a coding or ops agent. It checks your systems read-only and reports a table per asset.

Check whether my systems are affected by CVE-2026-137199 (cross-spawn: Command injection on Windows when spawning batch files), using the cve.now data below.

Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.

What cve.now has for CVE-2026-137199 (entry last updated 2026-11-30):
Affected:
- moxystudio node-cross-spawn: fixed in 6.0.7; from 7.0.0, fixed in 7.1.0
Fixed versions: 6.0.7, 7.1.0.
Conditions (all must be true for the bug to be hit):
- Windows only, where commands that are not executables (such as batch files) run through cmd.exe (source: https://github.com/moxystudio/node-cross-spawn/security/advisories/GHSA-ghv9-86vm-4v8m)
- Application passes untrusted input as arguments to a command that runs through cmd.exe (source: https://github.com/moxystudio/node-cross-spawn/security/advisories/GHSA-ghv9-86vm-4v8m)
Setup: unknown whether the bug needs a non-default feature or setting. Check the advisory.
Attacker needs: network access, no login, no user action.
CISA KEV: CVE-2026-137199 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-137199 only. If you also check another CVE, look up its own KEV status; never assume it from this one.

How to check:
- Installed software: check what is actually running, not what a repo declares. Read the version from each host, container image and Kubernetes node (the binary's version output, the OS package database, image layers), and check whether the conditions above hold there. Distribution packages may carry a backported fix under an older version number; confirm against the distribution's own advisory.

Verify against the linked advisories before concluding, and cite the date you read each one:
- https://github.com/moxystudio/node-cross-spawn/security/advisories/GHSA-ghv9-86vm-4v8m
- https://github.com/moxystudio/node-cross-spawn/issues/171
- https://github.com/moxystudio/node-cross-spawn/pull/191
- https://github.com/moxystudio/node-cross-spawn/pull/192
- https://github.com/moxystudio/node-cross-spawn/commit/1b71aa519a2e4f97d1f3ee27f0e2fc24ba17cf1a
- https://github.com/moxystudio/node-cross-spawn/commit/244ffeaa8473de0080c93ebbf779bb953b94114b
- https://github.com/moxystudio/node-cross-spawn/releases/tag/v6.0.7
- https://github.com/moxystudio/node-cross-spawn/releases/tag/v7.1.0
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.

Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.

Entry: https://cve.now/CVE-2026-137199
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example execute with name cve.get and arguments {"id": "CVE-2026-137199"}.

Affected versions

cve.now Index

26Pof 100 · provisional · methodology v3
  • Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
  • Exposure17/25No login or user action needed, reachable over the network without a login · Unknown: Advisories don't say whether default setups are affected
  • Reach?/20Unknown. No tracked technology or package matched
  • Severity9.2/10CVSS 9.2
  • No patch0/5No signal

What would change the score

  • Would score about 71 if added to CISA KEV
  • Would score about 66 if CISA's SSVC rates exploitation active
  • Would score about 31 if advisories confirm default setups are exposed

Timeline

  1. CVE published
  2. First seen by cve.now
  3. Posted on X by cve.now

Evidence 10

Questions about CVE-2026-137199

Is CVE-2026-137199 being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.

Source: cve.now feed data

What does this mean?

A crafted argument can break out of its quotes and run arbitrary commands on the Windows host. The flaw is in how cross-spawn runs commands that are not executables, such as batch files, through cmd.exe.

Source: github.com

Which versions are affected by CVE-2026-137199?

node-cross-spawn: before 6.0.7; from 7.0.0 before 7.1.0.

Source: cve.now feed data

Am I affected, and how do I check?

Affected versions are those before 6.0.7 and those from 7.0.0 up to but not including 7.1.0. Check the version of node-cross-spawn in the project's lockfile or with npm ls cross-spawn. The issue only applies on Windows and only where untrusted input is passed as arguments to a command that runs through cmd.exe.

Source: github.com

How do I fix CVE-2026-137199?

Upgrade to 6.0.7 if on the 6.x line, or to 7.1.0 if on the 7.x line. The facts name no other patch ids.

Source: github.com

No corrections so far. Something wrong on this page? Report an error.