CVE-2026-137198: cross-spawn: Argument injection on Windows via backslashes before a double quote

Published Nov 30, 2026
·
Updated

cross-spawn is a cross-platform solution for Node.js spawn and spawnSync. From 6.0.6 until 6.0.7 and from 7.0.4 until 7.1.0, Windows applications that pass untrusted arguments to commands routed through cmd.exe can be vulnerable because cross-spawn did not correctly double runs of backslashes before a double quote or at the end of an argument. Two or more backslashes could escape the argument's closing quote, allowing attacker-controlled text to become extra arguments or consume following arguments. The caller may not detect the injection when the target accepts the resulting arguments and exits successfully, while a target that rejects an unexpected argument can fail instead. The affected command class includes npm cmd-shims in nodemodules/.bin. This can change a target program's operation, although it does not by itself execute a second command and does not affect other platforms. This issue is fixed in versions 6.0.7 and 7.1.0.

Affected Software

1 affected component
npm/cross-spawn>=6.0.6<6.0.7, >=7.0.4<7.1.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade cross-spawn to a version that resolves this vulnerability.

    Fixed in 6.0.7
  2. Upgrade

    Upgrade cross-spawn to a version that resolves this vulnerability.

    Fixed in 7.1.0

Event History

Nov 30, 2026
CVE Published
via MITRE·08:36 PM
Data Sourced
via MITRE·08:36 PM
DescriptionWeakness

Frequently Asked Questions

1

Which deployments are exposed to this issue?

Only Windows applications are affected, and only when they pass untrusted arguments to commands that are routed through cmd.exe. npm cmd-shims in node_modules/.bin are included in the affected command class; other platforms are not affected.

2

What input is needed to trigger the injection?

An attacker needs control over an argument passed by the application, with two or more backslashes before a double quote or at the end of the argument. The malformed escaping can cause attacker-controlled text to be interpreted as additional arguments or to consume arguments that follow.

3

Does successful command execution rule out exploitation?

No. The caller may not notice the injection if the target program accepts the altered arguments and exits successfully. Targets that reject unexpected arguments may instead fail.

4

Is this equivalent to arbitrary command execution?

No. The issue can change the target program's operation by injecting or consuming arguments, but it does not itself execute a second command.

5

What versions should be used to remediate the issue?

Upgrade to cross-spawn 6.0.7 or 7.1.0. The affected ranges are from 6.0.6 until 6.0.7 and from 7.0.4 until 7.1.0.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203