CVE-2026-137198 — Cross-spawn — CWE-88
### Impact On Windows, when `cross-spawn` runs a command through `cmd.exe`, it quotes each argument and doubles the backslashes that precede a double quote or the end of the argument, so that they aren't taken as escaping the quote. Since `7.0.4`, `7.0.5` and `6.0.6`, which changed the regular expressions to fix a ReDoS vulnerability (GHSA-3xgq-45jj-v275), backslash runs weren't doubled correctly: `7.0.4` didn't double them at all, and `7.0.5`, `7.0.6` and `6.0.6` added only one backslash to each run. An argument with two or more backslashes before a double quote, or at its end, had its closing quote escaped, which let it split into extra arguments or swallow the next ones: ```js const spawn = require('cross-spawn'); // On Windows, the program received two arguments: `x\\` and `--evil` spawn.sync('foo.cmd', ['x\\\\" --evil']); ``` The caller can't tell: the command still exits successfully and nothing is written to stderr. Even an ordinary directory path such as `C:\some\dir\\` makes the caller's following arguments disappear. Applications are affected if they pass untrusted input as arguments to a command that runs through `cmd.exe` on Windows, which includes every npm cmd-shim in `node_modules/.bin`. The impact depends on the program: one that accepts extra arguments may act on the injected ones, e.g. a tool called with `--check` receiving an injected `--write`, while one that rejects an unexpected argument fails instead. This doesn't allow running other commands. Other platforms aren't affected. ### Patches This is fixed in `7.1.0` and `6.0.7`, which escape backslashes with a loop that handles any number of them in linear time. ### Workarounds Validate untrusted input so that only a safe subset is allowed. ### Credits MOXY Studio thanks Duong Bui Thai ([LinkedIn](https://www.linkedin.com/in/thaiducng/)) for privately reporting this vulnerability, and both @trackoor and @ogffx for independently reporting and fixing it in #188 and #190.
### Impact On Windows, when `cross-spawn` runs a command through `cmd.exe`, it quotes each argument and doubles the backslashes that precede a double quote or the end of the argument, so that they aren't taken as escaping the quote. Since `7.0.4`, `7.0.5` and `6.0.6`, which changed the regular expressions to fix a ReDoS vulnerability (GHSA-3xgq-45jj-v275), backslash runs weren't doubled correctly: `7.0.4` didn't double them at all, and `7.0.5`, `7.0.6` and `6.0.6` added only one backslash to each run. An argument with two or more backslashes before a double quote, or at its end, had its closing quote escaped, which let it split into extra arguments or swallow the next ones: ```js const spawn = require('cross-spawn'); // On Windows, the program received two arguments: `x\\` and `--evil` spawn.sync('foo.cmd', ['x\\\\" --evil']); ``` The caller can't tell: the command still exits successfully and nothing is written to stderr. Even an ordinary directory path such as `C:\some\dir\\` makes the caller's following arguments disappear. Applications are affected if they pass untrusted input as arguments to a command that runs through `cmd.exe` on Windows, which includes every npm cmd-shim in `node_modules/.bin`. The impact depends on the program: one that accepts extra arguments may act on the injected ones, e.g. a tool called with `--check` receiving an injected `--write`, while one that rejects an unexpected argument fails instead. This doesn't allow running other commands. Other platforms aren't affected. ### Patches This is fixed in `7.1.0` and `6.0.7`, which escape backslashes with a loop that handles any number of them in linear time. ### Workarounds Validate untrusted input so that only a safe subset is allowed. ### Credits MOXY Studio thanks Duong Bui Thai ([LinkedIn](https://www.linkedin.com/in/thaiducng/)) for privately reporting this vulnerability, and both @trackoor and @ogffx for independently reporting and fixing it in #188 and #190.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CVE-2026-137198
CVSS 8.3/10 · HIGH · 30.11.2026
CWE: CWE-88
Vector: CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 WHAT IS THIS VULNERABILITY?
Summary: ### Impact
On Windows, when cross-spawn runs a command through cmd.exe, it quotes each argument and doubles the backslashes that precede a double quote or the end of the argument, so that they aren't taken as escaping the quote. Since 7.0.4, 7.0.5 and 6.0.6, which changed the regular expressions to fix a ReDoS vulnerability (GHSA-3xgq-45jj-v275), backslash runs weren't doubled correc…
Affected: cross-spawn
⚡ ATTACK VECTOR
Network / Remote (AV:N) · no authentication required (PR:N) · no user interaction (UI:N).
🌍 REAL WORLD IMPACT
All confidential data readable/stealable; data can be modified or deleted; reduced availability or partial DoS (A:L).
🛡️ REMEDIATION
→ Apply vendor security update for cross-spawn.
→ Pre-patch: put service behind VPN or apply IP allowlist.
→ Add WAF rule, create IDS alert for anomalous traffic.
⚠️ URGENCY
⚠️ This week (7 days) — High risk, anonymous remote.
────────────────────────────────────────
[Automated Technical Vulnerability & CVSS Vector Analysis]