Skip to content

v7.1.1

Latest

Choose a tag to compare

@satazor satazor released this 28 Nov 23:10
· 15 commits to master since this release

Security

This release fixes a command injection vulnerability that affects Windows only (GHSA-w3gc-668g-rf8f, high).

7.1.0 fixed how arguments are escaped for batch files, but that escaping only applied when cross-spawn detected that the command was a batch file. When the command wasn't written as a plain program name or path, e.g. it contained double quotes or a space, cross-spawn could miss that cmd.exe would run a batch file, and escape the arguments for a regular program instead, which allowed running arbitrary commands.

Please upgrade. cross-spawn@6 users can upgrade to 6.0.8.

Behaviour change

On Windows, commands that run through cmd.exe are now always quoted. As on other platforms, the command must be the name or path of a single program, with its arguments passed in args: spawn('npm install') now fails with ENOENT instead of running npm with install. Also, cmd.exe's message for a command it can't find now shows the command in quotes, e.g. '"foo"' is not recognized as an internal or external command. See the Windows argument escaping section of the README.