Skip to content
← FrontpageMicrosoft hallmark logoMicrosoftAnalysis

Cross-spawn patches Windows batch command injection flaw

Listen to Briefing
0:00/1:53
Topographic elevation contour card for Cross-spawn patches Windows batch command injection flaw
VISUAL ARTWORK:Original editorial artwork. Third-party brand marks used under nominative fair use.

What happened.Node.js dependency cross-spawn patched CVE-2026-137199, a 9.2 CVSS 4.0 critical command injection flaw affecting Windows batch file execution.

Why it matters.Nearly every JavaScript build and CLI pipeline pulls in cross-spawn transitively, exposing Windows continuous integration runners and developer workstations to shell injection. Teams building Node.js tools for Windows should upgrade cross-spawn to 6.0.7 or 7.1.0 and avoid passing unvalidated user strings into batch wrappers.

The technical specifications:

  • Vulnerability mechanics: When routing commands through cmd.exe on Windows, cross-spawn only escaped secondary argument parsing for shims inside node_modules/.bin.
  • Bypass vectors: Attackers can break out of quotes on npm.cmd or global shims, strip trailing dots and spaces, or expand %VAR% and !VAR! variables.
  • Affected scope: Releases prior to 6.0.7 and 7.0.0 through 7.0.x expose Windows applications passing untrusted arguments to batch files.
  • Patch details: Versions 6.0.7 and 7.1.0 escape arguments with double quotes, neutralize percent signs, enforce cmd.exe /e:on /v:off, and reject line breaks.