{"cve":"CVE-2021-42740","nvd":{"published":"2021-10-21T15:15:07.633","modified":"2026-06-17T04:10:03.200","status":"Modified","description":"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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8},"cwes":["CWE-77"],"references":["https://github.com/substack/node-shell-quote/blob/master/CHANGELOG.md#173","https://github.com/substack/node-shell-quote/commit/5799416ed454aa4ec9afafc895b4e31760ea1abe","https://www.npmjs.com/package/shell-quote","https://github.com/substack/node-shell-quote/blob/master/CHANGELOG.md#173","https://github.com/substack/node-shell-quote/commit/5799416ed454aa4ec9afafc895b4e31760ea1abe"],"products":["shell-quote_project:shell-quote"],"source":"nvd","synced_at":"2026-10-19T21:24:39.218183596+00:00"},"epss":{"cve":"CVE-2021-42740","score":0.04221,"percentile":0.90999,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-g4rg-993r-mgx7","url":"https://osv.dev/vulnerability/GHSA-g4rg-993r-mgx7","summary":"Improper Neutralization of Special Elements used in a Command in Shell-quote","modified":"2026-09-10T03:49:38.560961563Z","packages":[{"ecosystem":"npm","name":"shell-quote","purl":"pkg:npm/shell-quote","ranges":[">=1.6.3 <1.7.3"],"fixed":["1.7.3"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}