CVE-2026-137197
cross- spawn: Command injection on Windows when the command is not a plain program name or path
- Severity
- 8.1HighNetwork attack, no privileges, no user interactionCVSS 3.1, CVE List
- Exploitation
- UnknownNo source reports exploitation yet.
- Exploit chance
- 0.82% in 30 daysPercentile58thEPSS, scored
- Listed fix
7.1.1for 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:HExploit chance over time
Affected
Packages 3
| Package | Affected | Fixed |
|---|---|---|
cross-spawnnpm | 7.0.0 up to 7.1.1 | 7.1.1 |
| before 6.0.8 | 6.0.8 | |
js-jqueryAzure Linux:3 | through 3.5.0-4 | None listed |
python-tensorboardAzure Linux:3 | through 2.16.2-6 | None 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.
| Package | Affected | Fixed |
|---|---|---|
cross-spawnTuxCare: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 High
CVSS: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 High
CVSS: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)orspawn('"tool"', args); - the command contains a space, tab,
,,;or=, wherecmd.exeends the command name, e.g.spawn('npm install', args), which runsnpm.cmd; - the command ends with a tab or other whitespace;
- the
PATHEXTpassed inoptions.envmakescmd.exefind a batch file that the parent'sPATHEXTdoesn'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 High
CVSS: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 High
CVSS: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 High
CVSS: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
| Day | Changed | Sources |
|---|---|---|
| Affected packages, key facts, references | GitHub Advisories | |
| Affected packages, other IDs, references | OSV | |
| Affected packages, other IDs | CVE List, NVD, OSV | |
| Other IDs, references | OSV | |
| Other IDs, published date | EUVD, NVD | |
| First indexed | CVE List |
Upstream dates may differ.
References
github.com/moxystudio/node-cross-spawn/security/advisories/GHSA-w3gc-668g-rf8f
github.com/moxystudio/node-cross-spawn/pull/196
github.com/moxystudio/node-cross-spawn/pull/197
github.com/moxystudio/node-cross-spawn/commit/4a15965b05415e9f817315206771b25558804b16
github.com/moxystudio/node-cross-spawn/commit/d0ead352a7380492cbb0f6548fa86f19448323c9
github.com/moxystudio/node-cross-spawn/releases/tag/v6.0.8
github.com/moxystudio/node-cross-spawn/releases/tag/v7.1.1
nvd.nist.gov/vuln/detail/CVE-2026-137197
github.com/advisories/GHSA-w3gc-668g-rf8f
github.com/CVEProject/cvelistV5/tree/main/cves/2026/137xxx/CVE-2026-137197.json