CVE-2021-23632
CVSS V2 High 7.5
CVSS V3 Critical 9.8
Description
All versions of package git are vulnerable to Remote Code Execution (RCE) due to missing sanitization in the Git.git method, which allows execution of OS commands rather than just git commands. Steps to Reproduce 1. Create a file named exploit.js with the following content: js var Git = require("git").Git; var repo = new Git("repo-test"); var user_input = "version; date"; repo.git(user_input, function(err, result) { console.log(result); }) 2. In the same directory as exploit.js, run npm install git. 3. Run exploit.js: node exploit.js. You should see the outputs of both the git version and date command-lines. Note that the repo-test Git repository does not need to be present to make this PoC work.
Overview
- CVE ID
- CVE-2021-23632
- Assigner
- report@snyk.io
- Vulnerability Status
- Analyzed
- Published Version
- 2022-03-17T12:15:07
- Last Modified Date
- 2022-03-24T01:49:42
Weakness Enumerations
CPE Configuration (Product)
CPE | Vulnerable | Operator | Version Start | Version End |
---|---|---|---|---|
cpe:2.3:a:git_project:git:*:*:*:*:*:node.js:*:* | 1 | OR | 0.1.5 |
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://snyk.io/vuln/SNYK-JS-GIT-1568518 | Exploit Third Party Advisory |
Sources
Source Name | Source URL |
---|---|
NIST | https://nvd.nist.gov/vuln/detail/CVE-2021-23632 |
MITRE | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-23632 |
History
Created | Old Value | New Value | Data Type | Notes |
---|---|---|---|---|
2022-04-04 00:42:35 | Added to TrackCVE | |||
2022-12-06 12:40:33 | 2022-03-17T12:15Z | 2022-03-17T12:15:07 | CVE Published Date | updated |
2022-12-06 12:40:33 | 2022-03-24T01:49:42 | CVE Modified Date | updated | |
2022-12-06 12:40:33 | Analyzed | Vulnerability Status | updated |