SecuFocus
Brief

cross-spawn on Windows: check your npm dependencies

The cross-spawn maintainers have disclosed a Windows command injection flaw. A fix was already available, so check which version your Node.js project actually installs.

Une développeuse vue de dos consulte un arbre de dépendances vert menthe sur son écran.

Generated image · SecuFocus

At a glance

Key points

Versions 6.0.7 and 7.1.0 are the first fixes for CVE-2026-137199 in their respective release lines. Run `npm ls cross-spawn` to find copies pulled in by other packages as well as direct dependencies.

What is the risk on Windows?

In advisory GHSA-ghv9-86vm-4v8m, the maintainers describe a Windows command injection flaw (CVE-2026-137199). An unintended command may run with the permissions of the program that uses the dependency. Check Windows development and build environments too, even if you deploy the application elsewhere.

Which versions should you check?

The advisory lists versions below 6.0.7 and versions from 7.0.0 up to but not including 7.1.0. The first fixed releases are 6.0.7 and 7.1.0. The npm registry shows that both were available before the maintainers published the advisory.

Look for indirect dependencies too

Once the usual dependencies are installed, run `npm ls cross-spawn` from the project root. It shows the installed versions and which packages depend on them. Check every entry: a patched copy and a vulnerable one can coexist in the same project.

Update and test on Windows

Install the latest patched version in a compatible release line. If another package pulls in cross-spawn, first look for an update to that package that brings in a fixed version. Check the lockfile and run a clean install with `npm ci`. Run `npm ls cross-spawn` again, then run your regular Windows tests and any build tasks the project uses.

Check and explore

Sources for this article

Numbers connect each reference to the passages that use it. Dates show when the documentation was consulted.

This article draws on the sources above. The exercises are for you to try on your devices; SecuFocus does not present them as tests carried out by its editorial team. Interfaces and features can change. Method and corrections.

Cite this article

Keep this reference with the article when you save or share it.