CVE-2021-42740
CVSS V2 High 7.5
CVSS V3 Critical 9.8
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.
Overview
- CVE ID
- CVE-2021-42740
- Assigner
- cve@mitre.org
- Vulnerability Status
- Analyzed
- Published Version
- 2021-10-21T15:15:07
- Last Modified Date
- 2021-10-28T13:54:18
Weakness Enumerations
CPE Configuration (Product)
CPE | Vulnerable | Operator | Version Start | Version End |
---|---|---|---|---|
cpe:2.3:a:shell-quote_project:shell-quote:*:*:*:*:*:node.js:*:* | 1 | OR | 1.7.3 |
CVSS Version 2
- Version
- 2.0
- Vector String
- AV:N/AC:L/Au:N/C:P/I:P/A:P
- Access Vector
- NETWORK
- Access Compatibility
- LOW
- Authentication
- NONE
- Confidentiality Impact
- PARTIAL
- Integrity Impact
- PARTIAL
- Availability Impact
- PARTIAL
- Base Score
- 7.5
- Severity
- HIGH
- Exploitability Score
- 10
- Impact Score
- 6.4
CVSS Version 3
- Version
- 3.1
- Vector String
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack Vector
- NETWORK
- Attack Compatibility
- LOW
- Privileges Required
- NONE
- User Interaction
- NONE
- Scope
- UNCHANGED
- Confidentiality Impact
- HIGH
- Availability Impact
- HIGH
- Base Score
- 9.8
- Base Severity
- CRITICAL
- Exploitability Score
- 3.9
- Impact Score
- 5.9
References
Reference URL | Reference Tags |
---|---|
https://github.com/substack/node-shell-quote/commit/5799416ed454aa4ec9afafc895b4e31760ea1abe | Patch Third Party Advisory |
https://www.npmjs.com/package/shell-quote | Vendor Advisory |
https://github.com/substack/node-shell-quote/blob/master/CHANGELOG.md#173 | Third Party Advisory |
Sources
Source Name | Source URL |
---|---|
NIST | https://nvd.nist.gov/vuln/detail/CVE-2021-42740 |
MITRE | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-42740 |
History
Created | Old Value | New Value | Data Type | Notes |
---|---|---|---|---|
2022-05-10 06:49:21 | Added to TrackCVE | |||
2022-12-05 13:01:07 | 2021-10-21T15:15Z | 2021-10-21T15:15:07 | CVE Published Date | updated |
2022-12-05 13:01:07 | 2021-10-28T13:54:18 | CVE Modified Date | updated | |
2022-12-05 13:01:07 | Analyzed | Vulnerability Status | updated |