# CVE-2021-23632: Remote Code Execution (RCE)

- Severity: Medium 6.6 (CVSS:3.1, scored by snyk) `CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.35%, higher than 84% of CVEs (2026-11-30)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-03-17T11:20:22.259Z
- Modified: 2026-07-08T06:49:39.855Z
- Also known as: GHSA-9gqr-xp86-f87h, SNYK-JS-GIT-1568518
- Weaknesses: CWE-78, CWE-94
- Assigned by: snyk

## 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.

(As written by CVE List.)

## Affected

- git: before unspecified
- git (npm): up to 0.1.5
- git_project git: up to 0.1.5

## Every score

- snyk: CVSS:3.1 6.6 Medium `CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 6.6 Medium `CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`

## References

- <https://snyk.io/vuln/SNYK-JS-GIT-1568518> (exploit, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-23632> (advisory)

## Sources

- CVE List: [CVE-2021-23632](https://www.cve.org/CVERecord?id=CVE-2021-23632), CVE Terms of Use, modified 2024-09-16
- GitHub Advisory Database: [GHSA-9gqr-xp86-f87h](https://github.com/advisories/GHSA-9gqr-xp86-f87h), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2021-23632](https://nvd.nist.gov/vuln/detail/CVE-2021-23632), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-23632 · Whole record: https://cve.day/CVE-2021-23632.json · Rebuilt by cve.day 2026-11-25T22:58:07.229Z
