
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-137197 is an OS command injection vulnerability in the cross-spawn npm package (by moxystudio), a cross-platform solution for Node.js spawn and spawnSync. On Windows, when a command passed through cmd.exe is not written as a plain program name or path, cross-spawn may fail to detect that cmd.exe will resolve a batch file, causing arguments to be escaped incorrectly and allowing command metacharacters to be interpreted by cmd.exe. Affected versions are all releases before 6.0.8 and versions 7.0.0 through 7.1.0 (inclusive). The vulnerability was published on November 30, 2026, with a CVSS v3.1 base score of 8.1 (High) (GitHub Advisory, Feedly).
The root cause is improper neutralization of special elements used in an OS command (CWE-78). Cross-spawn routes non-executable commands (e.g., .bat and .cmd batch files) through cmd.exe on Windows and applies stricter argument escaping when it detects a batch file target. However, the batch file detection logic could be bypassed when the command string contained double quotes (e.g., spawn('"tool.bat"', args)), command-name delimiters such as spaces, tabs, commas, semicolons, or equals signs (e.g., spawn('npm install', args)), trailing whitespace, or a child-specific PATHEXT environment variable that caused cmd.exe to resolve a batch file the parent process would not. In these cases, arguments were escaped as if targeting a regular executable, allowing an attacker-controlled argument such as "&calc to inject and execute arbitrary cmd.exe commands. The fix, implemented in PRs #196 (7.x) and #197 (6.x), ensures the command is always quoted when passed to cmd.exe and resolves the command using the child process's PATHEXT (GitHub Advisory, PR #196, PR #197).
Successful exploitation allows an unauthenticated remote attacker to execute arbitrary OS commands with the privileges of the Node.js process running on the affected Windows host. This results in high confidentiality, integrity, and availability impact — an attacker could read sensitive files, modify system state, install malware, or disrupt service operation. The scope is limited to the affected component, but the process-level access gained could enable lateral movement within the host environment (GitHub Advisory, Feedly).
As of the time of publication, there is no public proof-of-concept exploit and no evidence of in-the-wild exploitation (Feedly). The EPSS score is 0.0, indicating a currently low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires that the target application runs on Windows, uses cross-spawn with a command in one of the vulnerable forms, and passes untrusted user input as arguments — conditions that may be common in Node.js build tooling and CI/CD pipelines (GitHub Advisory).
cross-spawn (versions < 6.0.8 or 7.0.0–7.1.0) and passes user-controlled input as arguments to a spawn or spawnSync call where the command is not a plain program name (e.g., spawn('npm install', userInput) or spawn('"tool.bat"', userInput))."&calc or " & echo injected & ", which will be interpreted by cmd.exe as command separators when argument escaping is applied incorrectly.spawn call.cmd.exe, calc.exe, powershell.exe, net.exe) that are not part of normal application behavior.spawn/spawnSync calls, particularly arguments containing &, |, ", or other cmd.exe metacharacters.Upgrade cross-spawn to version 6.0.8 or 7.1.1, which fix the vulnerability by always quoting commands passed to cmd.exe and resolving commands using the child process's PATHEXT (GitHub Advisory). Versions before 6.0.0 are no longer maintained and will not receive a fix; users on those versions should upgrade to 7.1.1 (using overrides in package.json if needed). As a workaround, pass the program as the command and its arguments separately in args without quotes — e.g., spawn('npm', ['install', ...]) — and avoid setting PATHEXT in options.env. Additionally, validate and sanitize all command arguments, and avoid passing untrusted user input directly to spawn functions.
The vulnerability was disclosed by the cross-spawn maintainer (satazor) via a GitHub Security Advisory on November 28, 2026, alongside the release of patched versions. The advisory notes this is a bypass of the earlier batch file escaping fix (GHSA-ghv9-86vm-4v8m) introduced in versions 7.1.0 and 6.0.7. No significant broader media coverage or notable external researcher commentary has been identified beyond the official advisory and standard vulnerability tracking feeds (GitHub Advisory).
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."