Read the docs
TI-2021-18949 Aliases CVE-2021-42740GHSA-g4rg-993r-mgx7

The shell-quote package before 1.7.3 for Node.js allows command injection.

Priority MEDIUM 49CWE-77Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-77.

Summary

The shell-quote package before 1.7.3 for Node.js allows command injection. An attacker can inject unescaped shell metacharacters through a regex designed to support Windows drive letters. If the output of this package is passed to a real shell as a quoted argument to a command with exec(), an attacker can inject arbitrary commands. This is because the Windows drive letter regex character class is {A-z] instead of the correct {A-Za-z]. Several shell metacharacters exist in the space between capital letter Z and lower case letter a, such as the backtick character.

Why it matters now

EPSS 0.04221 91st percentileScored 2026-11-07
Fix Fixed shell-quote (npm): 1.7.3

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
——all versions—No fix listedCNA
—shell-quote (npm)1.6.3 to before 1.7.31.7.3Patch availableGHSA-g4rg-993r-mgx7
  • — Vendor— Affected all versions Fixed in — No fix listed CNA
  • shell-quote (npm) Vendor— Affected 1.6.3 to before 1.7.3 Fixed in 1.7.3 Patch available GHSA-g4rg-993r-mgx7

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:shell-quote_project:shell-quote:*:*:*:*:*:node.js:*:*before 1.7.3VulnerableShell-quote Project
  • cpe:2.3:a:shell-quote_project:shell-quote:*:*:*:*:*:node.js:*:* Versions before 1.7.3 Vulnerable ·Shell-quote Project

Remediation

  • Fix · GHSA-g4rg-993r-mgx7 shell-quote (npm) Fixed in 1.7.3 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2021-42740
  2. 2026-10-03 Alias added: GHSA-g4rg-993r-mgx7

References

  • TI-2026-11280 shell-quote parse() is quadratic in token count, enabling denial of service CVSS 4.0HIGH 8.7
  • TI-2016-08583 OS command injection in HackerOne shell-quote node module CVSS 3.1CRITICAL 9.8

Sources