CVE-2026-137199
CriticalCVSS 9.2Exploitation Probability (EPSS)
Elevated risk67th percentile - higher than 67% of all known CVEs
Summary
cross-spawn before 6.0.7 and 7.1.0 did not account for the second cmd.exe parse performed when a batch file outside node_modules/.bin forwards its arguments on Windows. A crafted argument could break out of its quotes and execute arbitrary commands, and trailing dots or spaces could bypass batch-file detection.
Risk Assessment
Node.js applications on Windows that pass untrusted data to commands routed through cmd.exe may allow an attacker to execute arbitrary code with the privileges of the running user.
Recommendation
Upgrade cross-spawn to version 6.0.7 or 7.1.0 (or later) and avoid passing untrusted arguments to commands launched through cmd.exe.
Other vulnerabilities in cross-spawn
See all- CVE-2026-137198High
cross-spawn from 6.0.6 until 6.0.7 and from 7.0.4 until 7.1.0 did not correctly double runs of backslashes before a double quote or at the end of an argument on Windows. Two or more backslashes could escape the argument's closing quote, allowing attacker-controlled text to become extra arguments or consume following arguments.
- CVE-2026-137197High
cross-spawn before 6.0.8 and 7.1.1 could miss that cmd.exe on Windows would resolve a batch file when a command was not written as a plain program name or path. Commands containing quotes, command-name delimiters, trailing whitespace, or a child-specific PATHEXT could allow cmd.exe to interpret metacharacters and execute arbitrary commands.
Original NVD description (English source)
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.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

