peter bassill · operator
$ cve CVE-2021-42740 JSON

CVE-2021-42740

9.8
CRITICAL · CVSS 3.1 · EPSS 4.2% (pctl 91)

In your normal cycle

Critical by CVSS (9.8), but no sign of active exploitation.

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.

Scoring

CVSS9.8 (CRITICAL, v3.1)
VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS4.22% — more likely to be exploited than 91% of all CVEs
WeaknessCWE-77
On CISA KEVno
Public exploitnone known
Published2021-10-21
Last modified2026-06-17

Affected (1)

VendorProduct
shell-quote projectshell-quote

References

→ the Explorer  ·  watch your stack  ·  NVD