Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSupply untrusted input to Windows Node app
-
DeliveryApp passes value to cross-spawn argument
-
ExploitRouted through cmd.exe to a batch file
-
ExecutionCrafted quotes break out on second parse
-
ImpactArbitrary command execution
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK
2 techniques across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation is limited to Windows and requires that the application pass untrusted input as arguments to a command cross-spawn routes through cmd.exe - specifically a non-executable target such as a batch file (.bat/.cmd) like npm.cmd, a globally installed package shim, or a user batch file that forwards its arguments (e.g. with %*), causing a second cmd.exe parse. Explicitly NOT affected: other platforms, the intentionally unescaped options.shell mode, and npm cmd-shims located in node_modules/.bin (which the original code already handled). Additional sub-conditions limit specific variants: trailing-dots/spaces batch-detection bypass depends on Windows name-stripping; %VAR% expansion requires an environment variable named VAR^ to exist; !VAR! expansion requires delayed expansion to be enabled in the Windows registry. The practical limiting factors for defenders are therefore the Windows requirement, the need for a re-parsing batch-file command in the call path, and untrusted data actually reaching the argument list. |
| Impact | This is a genuine high-priority issue, not a CVSS-inflated one, but its real-world risk is strongly conditioned by platform and usage. The supplied CVSS 4.0 vector (AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H) yields 9.2 with high impact on confidentiality, integrity and availability and no privileges required, consistent with arbitrary command execution via CWE-78. The AC:H/AT:P metrics reflect that exploitation is not universal: the attacker needs untrusted data to reach cross-spawn arguments for a command that cmd.exe re-parses (a batch file forwarding arguments), and some sub-vectors depend on environment state (an env var named VAR^ for %VAR%, or delayed expansion enabled in the registry for !VAR!) - the input does not describe these as attacker-controlled, so AT:P is a conditions marker, not a race/timing claim. The vuln.today Decision label is act_now, aligning with the GitHub advisory and the ubiquity of cross-spawn as a transitive npm dependency. No EPSS score and no CISA KEV entry are present in the input, so there is no evidence of active exploitation; exploitation status here rests on the GHSA advisory's demonstrative PoC, not confirmed in-the-wild use. Two signals to weigh against each other: the product footprint is enormous, but the vulnerable condition is Windows-only and excludes options.shell mode and npm cmd-shims under node_modules/.bin, which narrows the truly exploitable population. Net: prioritize patching on Windows Node.js deployments that pass untrusted input to spawned batch-file commands; EPSS is absent rather than low, so the act_now label should drive urgency. |
| Exploit ScenarioDerived | On Windows, an application uses cross-spawn to invoke a batch-file command (e.g. npm.cmd or a globally installed package shim) and passes attacker-influenced data as an argument. The attacker supplies a crafted value such as |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 30, 2026
Command injection in the cross-spawn Node.js package on Windows allows crafted arguments to break out of cmd.exe quoting and execute arbitrary commands when an application passes untrusted input to a batch file (.bat/.cmd) such as npm.cmd, a globally installed package shim, or a user batch file that forwards its arguments with %*. All versions before 6.0.7 on the 6.x line and before 7.1.0 on the 7.x line are affected; the flaw is reachable by unauthenticated remote input only where the application itself forwards attacker-controlled data into such an argument list, and non-Windows platforms plus the intentionally unescaped options.shell mode are explicitly unaffected. The issue is not in CISA KEV, but a public proof-of-concept reference exists - the advisory's own one-line reproducer (spawn.sync('npm', ['" & calc & "'])) and the upstream public issue that first reported the batch-file injection - though it is not verified as packaged, working exploit code, and no EPSS score was supplied with the intelligence feed.
RemediationAI
Vendor-released patch: upgrade to cross-spawn 7.1.0 (7.x line) or 6.0.7 (6.x line); for consumers still on a version below 6.0.0, which is listed as not yet patched, migrate to a patched major rather than waiting for a backport. Because this is a transitive dependency of many npm toolchains, update the lockfile and verify the resolved version rather than only the direct dependency. Where upgrading is not immediately possible, the vendor's stated workarounds are to validate untrusted input so that only a safe subset of characters is allowed, and to invoke executables directly instead of through batch files - both trade flexibility for safety, since legitimate arguments containing quotes, %, ! or metacharacters will be rejected or must bypass cross-spawn entirely. Note two behavioral side effects of the patched releases when testing: commands or arguments containing CR/LF now throw a TypeError, and cmd.exe is invoked with /v:off, so batch files that relied on registry-enabled delayed expansion (!VAR!) will no longer expand those variables. The maintainers also caution that no escaping scheme can protect batch files that consume arguments with unquoted %~1, so such batch files should be fixed at the source. Advisory and reproducer details: https://github.com/moxystudio/node-cross-spawn/security/advisories/GHSA-ghv9-86vm-4v8m.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in npm, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
cross-spawn is a widely used Node.js drop-in replacement for child_process.spawn that normalizes shebang handling and, on Windows, routes any target that is not a .exe/.com through cmd.exe. The root cause is CWE-78 (OS command injection) arising from an argument-escaping model that only modeled a single cmd.exe parse: a batch file that re-forwards its arguments (%*, "%~1") causes cmd.exe to parse them a second time, after the caret (^) escapes have already been consumed, so a quote-breakout argument escapes the quoting. Prior code only applied double-escaping to npm cmd-shims matching /node_modules[\\/]\.bin[\\/][^\\/]+\.cmd$/i, leaving npm.cmd, global shims and user batch files unprotected. The upstream fix (commits 1b71aa5 and 244ffea) replaces that narrow regexp with a general .bat/.cmd detector that first strips trailing dots and spaces (the same Windows name-normalization trick behind Node.js CVE-2024-36138), and swaps caret-based escaping for RFC-consistent double-quote escaping modeled on Rust's post-BatBadBut (CVE-2024-24576) approach. The patch also neutralizes %VAR% expansion by rewriting % as %%cd:~,% (an empty substring of the %cd% dynamic variable), because ^% does not stop expansion when an environment variable literally named VAR^ exists; adds /e:on /v:off to the cmd.exe invocation so command extensions are guaranteed and registry-enabled delayed expansion cannot expand !VAR!; and rejects CR/LF in commands and arguments with a TypeError, since cmd.exe treats line breaks as command separators and offers no escaping for them. The maintainers acknowledge escaping cannot fully fix batch files that use unquoted %~1.
Know when Node.js gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Untrusted input can reach spawn args remotely without auth (AV:N/PR:N/UI:N), but needs a re-parsing batch-file command path on Windows (AC:H); command execution gives full C/I/A.
Primary rating from Vendor (github).
CVSS VectorVendor: github
Lifecycle Timeline
2DescriptionCVE.org
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.
Blast Radius
ecosystem impact- 40 npm packages depend on cross-spawn (28 direct, 12 indirect)
Ecosystem-wide dependent count for version 7.0.0.
Technical POC Analysis
CWE-78: OS command injection from improper neutralization of special elements.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
CVE-2026-137199 is a critical command injection vulnerability in the widely used Node.js cross-spawn package on Windows, allowing arbitrary command execution when applications pass untrusted input to batch files. Any Windows-based service or tool that invokes .bat/.cmd files with attacker-influenced arguments is at risk, potentially leading to full system compromise. Leadership should prioritize remediation due to the widespread dependency and critical severity.
No vendor-released patch identified at time of analysis. Interim mitigations include: strict input validation and sanitization for all data passed to batch files; avoid invoking .bat/.cmd files with untrusted arguments; use alternative execution methods that do not rely on cmd.exe quoting (e.g., direct executable invocation); apply application-level filtering to block command injection patterns; monitor for suspicious process creation events; and restrict the privileges of applications using cross-spawn.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation
A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could
FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote
Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour
Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t
Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete
Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc
An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi
Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin
A vulnerability in NuPoint Messenger (NPM) of Mitel MiCollab through 9.8.0.33 allows an unauthenticated attacker to cond
EUVD-2026-139685
GHSA-ghv9-86vm-4v8m
NVD
CVE.org
EPSS
Exploit-DB