Every CVESearch/Get API key

CVE-2026-137197

cross-spawn: Command injection on Windows when the command is not a plain program name or path

Explain with AI
ChatGPTClaudeGoogle AI
Severity
8.1High
Network attack, no privileges, no user interactionCVSS 3.1, CVE List
Exploitation
Unknown
No source reports exploitation yet.
Exploit chance
0.82% in 30 days
Percentile58th
EPSS, scored
Listed fix
7.1.1 for cross-spawn (npm)
From GitHub Advisories1 more listed version, 2 other affected packages

Overview

cross-spawn is a cross-platform solution for Node.js spawn and spawnSync. Prior to 6.0.8 and 7.1.1, applications running on Windows that pass untrusted arguments can be vulnerable when a command sent through cmd.exe is not written as a plain program name or path. Commands containing quotes, command-name delimiters, trailing whitespace, or a child-specific PATHEXT could cause cross-spawn to miss that cmd.exe would resolve a batch file. The arguments were then escaped as though the target were a regular program, allowing command metacharacters in an argument to be interpreted by cmd.exe and execute arbitrary commands. Applications are affected only when they use one of these command forms and pass untrusted input as arguments. This issue is fixed in versions 6.0.8 and 7.1.1.

CVSS 3.1 vector

Exploitability

Attack vector
Network
Complexity
High
Privileges needed
None
User interaction
None

Impact

Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Exploit chance over time

Unchanged since Dec 1, 2026
EPSS score 0.82% every day from Dec 1, 2026 to Dec 4, 2026.

Affected

Packages 3

Affected packages
PackageAffectedFixed
cross-spawn
npm
7.0.0 up to 7.1.1
7.1.1
before 6.0.8
6.0.8
js-jquery
Azure Linux:3
through 3.5.0-4None listed
python-tensorboard
Azure Linux:3
through 2.16.2-6None listed

Only in multi-CVE advisories 1

Each of these advisories covers several CVEs at once, so it doesn’t establish that this one affects the package.

Packages named only by advisories that cover several CVEs
PackageAffectedFixed
cross-spawn
TuxCare:npm
7.0.6-tuxcare.0 up to 7.0.6-tuxcare.1, plus listed versions
From an advisory covering 3 CVEs
7.0.6
7.0.6-tuxcare.1

Products 1

Sources

CVE List Score usedCVSS 3.18.1

cross-spawn: Command injection on Windows when the command is not a plain program name or path

cross-spawn is a cross-platform solution for Node.js spawn and spawnSync. Prior to 6.0.8 and 7.1.1, applications running on Windows that pass untrusted arguments can be vulnerable when a command sent through cmd.exe is not written as a plain program name or path. Commands containing quotes, command-name delimiters, trailing whitespace, or a child-specific PATHEXT could cause cross-spawn to miss that cmd.exe would resolve a batch file. The arguments were then escaped as though the target were a regular program, allowing command metacharacters in an argument to be interpreted by cmd.exe and execute arbitrary commands. Applications are affected only when they use one of these command forms and pass untrusted input as arguments. This issue is fixed in versions 6.0.8 and 7.1.1.

Record
CVE-2026-137197
CVSS 3.1
8.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-78
Updated
2026-12-01
EUVDEUVD-2026-139682CVSS 3.18.1

cross-spawn is a cross-platform solution for Node.js spawn and spawnSync. Prior to 6.0.8 and 7.1.1, applications running on Windows that pass untrusted arguments can be vulnerable when a command sent through cmd.exe is not written as a plain program name or path. Commands containing quotes, command-name delimiters, trailing whitespace, or a child-specific PATHEXT could cause cross-spawn to miss that cmd.exe would resolve a batch file. The arguments were then escaped as though the target were a regular program, allowing command metacharacters in an argument to be interpreted by cmd.exe and execute arbitrary commands. Applications are affected only when they use one of these command forms and pass untrusted input as arguments. This issue is fixed in versions 6.0.8 and 7.1.1.

Record
EUVD-2026-139682
CVSS 3.1
8.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-30
GitHub AdvisoriesGHSA-w3gc-668g-rf8fCVSS 3.18.1

cross-spawn: Command injection on Windows when the command is not a plain program name or path

Impact

On Windows, cross-spawn runs commands that aren't executables, such as batch files (.bat and .cmd), through cmd.exe, and escapes their arguments for it. Batch files need a stricter escaping, because cmd.exe parses their arguments a second time. 7.1.0 and 6.0.7 fixed that escaping (GHSA-ghv9-86vm-4v8m), but it only applies when cross-spawn detects that the command is a batch file.

The detection could be bypassed when the command isn't written as a plain program name or path, while cmd.exe still runs a batch file:

  • the command contains double quotes, e.g. spawn('"tool.bat"', args) or spawn('"tool"', args);
  • the command contains a space, tab, ,, ; or =, where cmd.exe ends the command name, e.g. spawn('npm install', args), which runs npm.cmd;
  • the command ends with a tab or other whitespace;
  • the PATHEXT passed in options.env makes cmd.exe find a batch file that the parent's PATHEXT doesn't.

In those cases the arguments were escaped for a regular program, and an argument such as "&calc could run arbitrary commands.

Applications are affected if they run on Windows, pass a command in one of these forms, and pass untrusted input as arguments.

Patches

Fixed in 7.1.1 and 6.0.8. The command is now always quoted when it runs through cmd.exe, so cmd.exe treats it as a single name. Double quotes are removed from it first, since Windows file names can't contain them, and it's looked up with the child's PATHEXT. As a consequence, the command must be the name or path of a single program, as documented: spawn('npm install') now fails with ENOENT, like on other platforms.

Versions before 6.0.0 are not maintained and won't be fixed. Upgrade to 7.1.1, or force it with overrides in package.json.

Workarounds

Pass the program as the command and its arguments in args, without quotes, e.g. spawn('npm', ['install', ...]), and don't set PATHEXT in options.env.

Record
GHSA-w3gc-668g-rf8f
CVSS 3.1
8.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-78
Updated
2026-12-04
NVDCVSS 3.18.1

cross-spawn is a cross-platform solution for Node.js spawn and spawnSync. Prior to 6.0.8 and 7.1.1, applications running on Windows that pass untrusted arguments can be vulnerable when a command sent through cmd.exe is not written as a plain program name or path. Commands containing quotes, command-name delimiters, trailing whitespace, or a child-specific PATHEXT could cause cross-spawn to miss that cmd.exe would resolve a batch file. The arguments were then escaped as though the target were a regular program, allowing command metacharacters in an argument to be interpreted by cmd.exe and execute arbitrary commands. Applications are affected only when they use one of these command forms and pass untrusted input as arguments. This issue is fixed in versions 6.0.8 and 7.1.1.

Record
CVE-2026-137197
CVSS 3.1
8.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-78
Updated
2026-12-01
OSVCVSS 3.18.1

cross-spawn: Command injection on Windows when the command is not a plain program name or path

cross-spawn is a cross-platform solution for Node.js spawn and spawnSync. Prior to 6.0.8 and 7.1.1, applications running on Windows that pass untrusted arguments can be vulnerable when a command sent through cmd.exe is not written as a plain program name or path. Commands containing quotes, command-name delimiters, trailing whitespace, or a child-specific PATHEXT could cause cross-spawn to miss that cmd.exe would resolve a batch file. The arguments were then escaped as though the target were a regular program, allowing command metacharacters in an argument to be interpreted by cmd.exe and execute arbitrary commands. Applications are affected only when they use one of these command forms and pass untrusted input as arguments. This issue is fixed in versions 6.0.8 and 7.1.1.

Record
CVE-2026-137197
CVSS 3.1
8.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-78
Updated
2026-12-01
OSVAZL-117515No score

CVE-2026-137197 affecting package js-jquery 3.5.0-4

cross-spawn is a cross-platform solution for Node.js spawn and spawnSync. Prior to 6.0.8 and 7.1.1, applications running on Windows that pass untrusted arguments can be vulnerable when a command sent through cmd.exe is not written as a plain program name or path. Commands containing quotes, command-name delimiters, trailing whitespace, or a child-specific PATHEXT could cause cross-spawn to miss that cmd.exe would resolve a batch file. The arguments were then escaped as though the target were a regular program, allowing command metacharacters in an argument to be interpreted by cmd.exe and execute arbitrary commands. Applications are affected only when they use one of these command forms and pass untrusted input as arguments. This issue is fixed in versions 6.0.8 and 7.1.1.

Record
AZL-117515
Updated
2026-12-03
OSVAZL-117623No score

CVE-2026-137197 affecting package python-tensorboard 2.16.2-6

cross-spawn is a cross-platform solution for Node.js spawn and spawnSync. Prior to 6.0.8 and 7.1.1, applications running on Windows that pass untrusted arguments can be vulnerable when a command sent through cmd.exe is not written as a plain program name or path. Commands containing quotes, command-name delimiters, trailing whitespace, or a child-specific PATHEXT could cause cross-spawn to miss that cmd.exe would resolve a batch file. The arguments were then escaped as though the target were a regular program, allowing command metacharacters in an argument to be interpreted by cmd.exe and execute arbitrary commands. Applications are affected only when they use one of these command forms and pass untrusted input as arguments. This issue is fixed in versions 6.0.8 and 7.1.1.

Record
AZL-117623
Updated
2026-12-03
OSVCLSA-2026-1796131683No score

TuxCare security update for cross-spawn (3 CVEs)

TuxCare rebuilt cross-spawn to address 3 CVEs. Fixed in 7.0.6-tuxcare.1.

Record
CLSA-2026-1796131683
Updated
2026-12-02

History

Recorded by Every CVE

Changes recorded by Every CVE
DayChangedSources
Affected packages, key facts, referencesGitHub Advisories
Affected packages, other IDs, referencesOSV
Affected packages, other IDsCVE List, NVD, OSV
Other IDs, referencesOSV
Other IDs, published dateEUVD, NVD
First indexedCVE List

Upstream dates may differ.

References

MoveEnter Open