CVE & CISA-KEV Catalog

CVE-2021-42740

CRITICALEPSS 90th pctl
9.8
CVSS v3
NVD

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.

How to fix

Remediation Available
node-shell-quoteDebian
Fixed in:1.7.3+~1.7.1-1CVE-2021-42740
Fixed in:1.7.3+~1.7.1-1CVE-2021-42740
Fixed in:1.7.3+~1.7.1-1CVE-2021-42740

Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.

CVSS v3 Vector

Exploitability

Attack VectorNetwork
Attack ComplexityLow
Privileges RequiredNone
User InteractionNone
ScopeUnchanged

Impact

ConfidentialityHigh
IntegrityHigh
AvailabilityHigh

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Exploit Intelligence

4.34%probability of exploitation in 30 days
90thpercentile

High risk: more likely to be exploited than 90% of all known CVEs.

References

Vendor Advisory1
Third-Party Advisory1

Related Vulnerabilities

Other CWE-77 (Command Injection) vulnerabilities, ordered by exploit likelihood. View all

CVESeverityCVSSEPSSExploitedFix
CVE-2024-3400Critical10.0100%KEV + Ransom-
CVE-2024-21887Critical9.1100%KEV + Ransom-
CVE-2023-1671Critical9.8100%KEVFix
CVE-2023-1389High8.8100%KEVFix
CVE-2021-1498Critical9.8100%KEVFix
CVE-2012-1823Critical9.8100%KEVFix
Embed a live status badge for CVE-2021-42740
CVE-2021-42740 severity badge

Markdown

[![CVE-2021-42740](https://tridentstack.com/cve/badge/CVE-2021-42740.svg)](https://tridentstack.com/cve/CVE-2021-42740)

HTML

<a href="https://tridentstack.com/cve/CVE-2021-42740"><img src="https://tridentstack.com/cve/badge/CVE-2021-42740.svg" alt="CVE-2021-42740"></a>

Find and fix vulnerabilities across your fleet

TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.

Start free

This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2024-11-21.