
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-137198 is an argument injection vulnerability in cross-spawn, a cross-platform Node.js spawn/spawnSync solution maintained by moxystudio. On Windows, affected versions failed to correctly double runs of backslashes before a double quote or at the end of an argument when routing commands through cmd.exe, allowing attacker-controlled text to escape argument quoting and inject additional arguments. Affected versions are >= 6.0.6, < 6.0.7 and >= 7.0.4, < 7.1.0; other platforms are not affected. The vulnerability was privately reported by Duong Bui Thai and disclosed on November 28–30, 2026, with patches released the same day. It carries a CVSS v4.0 base score of 8.3 (High) (GitHub Advisory, Feedly).
The root cause is CWE-88 (Improper Neutralization of Argument Delimiters in a Command — Argument Injection). A prior fix for a ReDoS vulnerability (GHSA-3xgq-45jj-v275) introduced a regex-based backslash-doubling algorithm that only added one backslash to each run instead of doubling the entire run; version 7.0.4 did not double them at all. When cross-spawn routes a non-executable command (e.g., a .bat or .cmd file) through cmd.exe on Windows, it wraps each argument in double quotes and is supposed to double any backslashes immediately preceding a quote or at the argument's end. Because this doubling was incorrect, an argument containing two or more backslashes before a closing quote — such as x\\ --evil — would escape the closing quote, causing the argument to split and inject extra tokens into the command line. The affected command class prominently includes npm cmd-shims in node_modules/.bin, which are invoked by virtually every npm script on Windows (GitHub Advisory, PR #191).
An attacker who can control arguments passed to a cross-spawn-invoked command on Windows can inject additional arguments or cause following arguments to be consumed, silently altering the target program's behavior. For example, a tool invoked with --check could receive an injected --write, causing unintended file modifications; conversely, a program that rejects unexpected arguments may fail instead. Critically, the calling application cannot reliably detect the injection because the command may still exit successfully with no stderr output. The vulnerability does not by itself enable execution of a second command and does not affect Linux or macOS systems (GitHub Advisory).
There is no public proof-of-concept exploit and no evidence of in-the-wild exploitation at the time of disclosure (Feedly). The EPSS score is 0.0, reflecting low current exploitation probability. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog. Exploitation requires the attacker to control untrusted input that is passed as arguments to a command routed through cmd.exe on Windows, which is a prerequisite that limits the attack surface to applications explicitly handling user-supplied data in spawned processes.
cross-spawn versions 6.0.6 or 7.0.4–7.0.6 and passes user-supplied or externally influenced data as arguments to a command that resolves to a .bat or .cmd file (including npm cmd-shims in node_modules/.bin).x\\\ --injected-flag. Due to the flawed escaping, the backslashes will escape the closing quote rather than being doubled.cross-spawn call.cmd.exe receives the malformed command line, interprets the escaped quote as part of the argument rather than its terminator, and parses the injected text as additional arguments to the target program..cmd shims in node_modules/.bin) observed receiving unexpected command-line arguments that differ from what the parent application intended to pass.Update cross-spawn to version 6.0.7 (final 6.x release) or 7.1.0 (or later), which replace the flawed regex-based backslash-doubling with a loop-based algorithm that correctly handles any number of backslashes in linear time and adopts a double-quote-based escaping strategy for batch files (GitHub Advisory, PR #191). As a workaround where upgrading is not immediately possible, validate and sanitize untrusted input to permit only a known-safe subset of characters before passing it as arguments to spawned processes. Applications that do not pass untrusted input to spawned commands on Windows are not at risk.
The vulnerability was privately reported by Duong Bui Thai and independently discovered and partially fixed by community contributors @trackoor and @ogffx via pull requests #188 and #190 before the maintainer (satazor) merged the comprehensive fix in PR #191. The fix also addresses a related batch-file escaping issue (GHSA-ghv9-86vm-4v8m) and adopts the same double-quote-based approach that Rust adopted for batch files following the BatBadBut vulnerability (CVE-2024-24576), indicating awareness of the broader Windows argument-escaping problem space in the open-source community (GitHub Advisory, PR #191).
Fix availability across major Linux distributions and their releases.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."