External risk intelligence

Cross-spawn Argument Injection Vulnerability

CVE advisorySeverity: CRITICAL (CVSS 9.2)

CVE-2026-137199

This vulnerability exists in a Node.js library used for process spawning. It requires specific conditions on Windows, such as passing untrusted arguments to commands routed through cmd.exe or batch files. It is a build-time or internal library dependency issue rather than a component that is natively internet-facing or reachable via public network services by default.

OS Command Injection

Halo Surface Signal: 1 out of 5 — much less likely to be public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

This advisory concerns a security vulnerability in the `cross-spawn` Node.js library. When running on Windows, a flaw in how the library processes command-line arguments could allow an attacker to execute arbitrary commands. This is particularly relevant if untrusted arguments are passed to commands executed by batch files. The main concern is to confirm if this library is used in affected ways within our Windows environments.

  • Library flaw allows command execution via batch files.
  • Important if your Windows systems use this library.
  • Confirm relevance and exposure in your environment.

Attack Path

How an attacker could exploit the issue

Attackers could exploit this vulnerability by sending specially crafted arguments to commands that are processed through `cmd.exe` on Windows. This could occur when a batch file outside of a Node.js project's local dependencies forwards arguments. If successful, an attacker could execute arbitrary commands by bypassing security measures through techniques like trailing dots, spaces, or variable expansion.

  • Requires untrusted arguments on Windows.
  • Triggers command execution via `cmd.exe`.
  • Allows arbitrary code execution.

Live Threat

Current exploitation, exposure, and threat context

On Windows systems, when untrusted arguments are passed to commands processed via `cmd.exe`, particularly through batch files outside of `node_modules/.bin`, there is a possibility for commands to be executed. This occurs because `cross-spawn` did not initially account for a secondary parsing phase of `cmd.exe` when handling batch file arguments. This vulnerability is specific to Windows and does not affect other platforms or when the `options.shell` mode is intentionally unescaped.

  • Arbitrary command execution on Windows.
  • Crafted arguments bypass security measures.
  • Compromise of system integrity.

Operational Fix

Recommended remediation, mitigation, and detection steps

Teams responsible for Node.js applications and their build pipelines should prioritize understanding the impact of this vulnerability. The first practical step is to identify all instances of the affected library within your environment, assess their reachability and criticality to business operations, and then confirm the accountable application or platform owner before planning any remediation.

  • Own by application or platform teams.
  • Verify library usage and reachability.
  • Plan updates during maintenance windows.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is cross-spawn and how is it used in software?

Cross-spawn is a Node.js utility library designed to simplify running external commands across different operating systems. Developers use it to ensure that spawning processes, like running scripts or system tools, works consistently whether the code runs on Windows, Linux, or macOS, abstracting away platform-specific command execution differences.

What does CVE-2026-137199 mean for system security?

This vulnerability is an instance of CWE-78, or OS Command Injection. It occurs because the library fails to properly sanitize inputs on Windows when interacting with batch files. This flaw allows a malicious actor to inject custom commands into the argument list, which the system then executes with the same permissions as the application running the code.

When does this vulnerability trigger?

The flaw triggers specifically on Windows when untrusted input is passed to commands routed through cmd.exe, particularly via batch files located outside the project's dependency folder. It does not occur on Linux or macOS, and it is not triggered when using the intentional, unescaped shell execution mode provided by the library.

Is my environment at risk from this flaw?

According to Halo Surface Signal, this vulnerability is considered very unlikely for most systems. It is an internal library dependency issue rather than a service exposed directly to the internet. You should focus on applications that process external, untrusted input on Windows-based hosts.

How should I respond to this advisory?

Begin by auditing your dependency tree to identify if your Node.js projects include versions of cross-spawn prior to 6.0.7 or 7.1.0. Once identified, evaluate if those applications process untrusted user input on Windows. Coordinate with application owners to schedule an update to the patched versions as part of your standard maintenance.

References