Skip to main content

cross-spawn EUVDEUVD-2026-139685

| CVE-2026-137199 CRITICAL
OS Command Injection (CWE-78)
2026-11-30 security-advisories@github.com GHSA-ghv9-86vm-4v8m
9.2
CVSS 4.0 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Supply untrusted input to Windows Node app
  2. Delivery
    App passes value to cross-spawn argument
  3. Exploit
    Routed through cmd.exe to a batch file
  4. Execution
    Crafted quotes break out on second parse
  5. Impact
    Arbitrary 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 " & calc & "; because the batch file re-forwards arguments with %* and cmd.exe parses them a second time, the quotes break out and the injected command runs. The GHSA advisory includes a demonstrative PoC (spawn.sync('npm', ['" & calc & "']) launching calc.exe); the input does not label it as confirmed weaponized exploit code.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 1.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

node-cross-spawn 7.0.0, < 7.1.0
node-cross-spawn < 6.0.7

Affected Packages

npm cross-spawn fix: 6.0.7, 7.1.0
euvd node_cross_spawn fix: 6.0.7, 7.1.0

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

Vendor (github) PRIMARY 9.2 CRITICAL
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
vuln.today AI 8.1 HIGH

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.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Network
Attack Complexity
High
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Nov 30, 2026 - 22:20 EUVD
CVE Published
Nov 30, 2026 - 21:17 cve.org
CRITICAL 9.2

DescriptionCVE.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
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
1.0%
Top 36% exploitable
Prevalence
Ubiquitous
cross-spawn is among the most-downloaded npm packages, a transitive dependency nearly everywhere
Threat Intel
1
1 source
Social Media
2
Sightings
Data Quality
3 sources
Confidence: Low

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.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 1.0%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

47
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

OS command injection occurs when an application passes unsanitized user input directly into system shell commands.

CVE-2025-68613 HIGH POC
8.8 Dec 19

Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation

CVE-2024-41713 CRITICAL POC
9.1 Oct 21

A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could

CVE-2024-55591 CRITICAL POC
9.8 Jan 14

FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote

CVE-2023-44487 HIGH POC
7.5 Oct 10

Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour

CVE-2014-7205 CRITICAL POC
10.0 Oct 08

Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t

CVE-2025-59528 CRITICAL POC
10.0 Sep 22

Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete

CVE-2017-14849 HIGH POC
7.5 Sep 28

Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc

CVE-2017-5941 CRITICAL POC
9.8 Feb 09

An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner

CVE-2014-0224 HIGH POC
7.4 Jun 05

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

CVE-2014-3744 HIGH POC
7.5 Oct 23

Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi

CVE-2014-9566 HIGH POC
7.5 Mar 10

Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin

CVE-2024-35286 CRITICAL POC
9.8 Oct 21

A vulnerability in NuPoint Messenger (NPM) of Mitel MiCollab through 9.8.0.33 allows an unauthenticated attacker to cond

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy