# CVE-2024-21532: ggit is vulnerable to Command Injection via the fetchTags(branch) API

- Severity: High 7.3 (CVSS:3.1, scored by snyk) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P`
- 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): 1.29%, higher than 71% of CVEs (2026-12-01)
- Published: 2024-10-08T05:00:03.891Z
- Modified: 2026-06-17T07:09:41.437Z
- Also known as: GHSA-62cx-5xj4-wfm4
- Weaknesses: CWE-78
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: snyk

## Description

All versions of the package ggit are vulnerable to Command Injection via the fetchTags(branch) API, which allows user input to specify the branch to be fetched and then concatenates this string along with a git command which is then passed to the unsafe exec() Node.js child process API.

(As written by CVE List.)

## Affected

- ggit: before *
- bahmutov ggit: before *
- ggit (npm): up to 2.4.12

## Every score

- snyk: CVSS:3.1 7.3 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P`
- GitHub: CVSS:3.1 7.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N`

## References

- <https://security.snyk.io/vuln/SNYK-JS-GGIT-5731320> (web)
- <https://gist.github.com/lirantal/d8f87b366d2078e6118ab7bf2b005f02> (web)
- <https://github.com/bahmutov/ggit/blob/2e85b0316d9c272e067dca5679d39e302f4cb9cd/README.md?plain=1#L3>
- <https://nvd.nist.gov/vuln/detail/CVE-2024-21532> (advisory)
- <https://github.com/bahmutov/ggit> (package)

## Sources

- CVE List: [CVE-2024-21532](https://www.cve.org/CVERecord?id=CVE-2024-21532), CVE Terms of Use, modified 2026-03-21
- GitHub Advisory Database: [GHSA-62cx-5xj4-wfm4](https://github.com/advisories/GHSA-62cx-5xj4-wfm4), CC-BY-4.0, modified 2024-10-08
- NVD: [CVE-2024-21532](https://nvd.nist.gov/vuln/detail/CVE-2024-21532), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-21532 · Whole record: https://cve.day/CVE-2024-21532.json · Rebuilt by cve.day 2026-11-25T22:58:46.160Z
