Skip to content
PatchBriefing

Search PatchBriefing

Type at least two characters. Results update as you type.

Search CVEs, products, packages and article titles.

Nothing found. Identifiers such as CVE and GHSA can be searched in both languages.

Subscribe

Critical · 9.2 Node.js & npm CVE-2026-137199 GHSA-ghv9-86vm-4v8m

cross-spawn Windows Command Injection Vulnerability (CVE-2026-137199)

A command injection vulnerability in cross-spawn allows arbitrary command execution on Windows when untrusted arguments are passed to batch files via cmd.exe. Fixed in versions 6.0.7 and 7.1.0.

By PatchBriefing · ·

Produced automatically from official sources with the help of AI. How we work →

Synthesized by AI from 4 sources · updated 1 day ago

AI summary

A command injection vulnerability has been identified in cross-spawn, a widely used Node.js library for spawning processes across platforms. The issue affects Windows environments and allows attackers to execute arbitrary commands when an application passes untrusted arguments to batch files. The vulnerability has been assigned CVE-2026-137199 and carries a severity score of 9.2.

What happened

cross-spawn, a cross-platform library for Node.js used to spawn and spawnSync processes, contains a command injection vulnerability on Windows. The issue arises because cross-spawn did not account for a second parsing pass performed by cmd.exe when a batch file located outside node_modules/.bin forwards its arguments to another process. A crafted argument could break out of its quoting and execute arbitrary commands through npm.cmd, globally installed package shims, or user-defined batch files.

Technical cause

The root cause is improper neutralization of special elements used in an OS command (CWE-78). Several distinct bypass techniques were identified: trailing dots or spaces in a filename could evade batch-file detection; a percent-delimited variable in an argument could be expanded if an environment variable with a matching name followed by a caret existed; and an exclamation-delimited variable could be expanded if delayed expansion was enabled in the Windows registry. These conditions allowed an attacker-controlled argument to be reinterpreted by cmd.exe and executed as a command. The vulnerability is specific to Windows; other platforms and the intentionally unescaped options.shell mode are not affected.

Who is affected

Applications running on Windows that use cross-spawn to execute batch files with untrusted or externally influenced arguments are affected. This includes scenarios involving npm.cmd, globally installed package shims, or custom batch files that forward their arguments to other processes.

Affected versions

cross-spawn versions before 6.0.7 are affected. Additionally, versions from 7.0.0 up to (not including) 7.1.0 are affected. Versions 6.0.7 and 7.1.0 contain the fix.

Fixes and mitigation

The vendor has released fixed versions: 6.0.7 for the 6.x release line and 7.1.0 for the 7.x release line. Both versions resolve the batch-file parsing issue described in this advisory.

Recommended action

Update cross-spawn to version 6.0.7 or 7.1.0, depending on which release line your project uses. If immediate updating is not possible, review any code paths on Windows that pass untrusted or externally supplied arguments to batch files or shims invoked through cmd.exe, and avoid forwarding unsanitized input to such processes.

PatchBriefing score

9.2 / 10 · Critical

Official CVSS: 9.2

CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

EPSS 0.0101 (64 percentile)

Why this score

The PatchBriefing score equals the official CVSS score; when this article covers several vulnerabilities, the highest one. Signals such as known exploitation and EPSS are listed separately and do not change the score.

Affected versions

cross-spawn < 6.0.7
vulnerable
cross-spawn ≥ 0 < 6.0.7
vulnerable
≥ 6.0.7
patched
≥ 7.1.0
patched

Reported fixes

The vendor has released fixed versions: 6.0.7 for the 6.x release line and 7.1.0 for the 7.x release line. Both versions resolve the batch-file parsing issue described in this advisory.

How this was built

4 source records were collected, matched and used to prepare the report above.

  • NVD (NIST) database
  • GitHub Advisory Database database
  • OSV.dev database
  • CVE.org database
Unified report
cross-spawn Windows Command Injection Vulnerability (CVE-2026-137199)
1 article · 4 sources cited
Revision history
  1. Published
  2. Generated
  3. Published
  4. Early Warning
The Morning Brief

Relevant changes for the stacks you follow.

Choose your stacks, topics and optional WordPress plugins. At 07:00 CET, matching advisories and releases from the reporting period are grouped into one email.

✓ Choose stacks and topics✓ Change preferences anytime✓ One grouped email