Command Injection Vulnerability in shell-quote for Node.js
CVE-2021-42740

9.8CRITICAL

Key Information:

Vendor
CVE Published:
21 October 2021

What is CVE-2021-42740?

The shell-quote package prior to version 1.7.3 for Node.js is susceptible to command injection due to improper handling of regex designed for Windows drive letters. An attacker can exploit this vulnerability by injecting unescaped shell metacharacters, which can lead to the execution of arbitrary commands when the output is processed by a shell command via exec(). This occurs because the regex incorrectly uses {A-z] instead of {A-Za-z], thus allowing access to several shell metacharacters including harmful characters found in the ASCII range between uppercase and lowercase letters.

References

EPSS Score

9% chance of being exploited in the next 30 days.

CVSS V3.1

Score:
9.8
Severity:
CRITICAL
Confidentiality:
High
Integrity:
High
Availability:
High
Attack Vector:
Network
Attack Complexity:
Low
Privileges Required:
None
User Interaction:
None
Scope:
Unchanged

Timeline

  • Vulnerability published

  • Vulnerability Reserved

.