# CVE-2026-76218: GitPython before 3.1.58 Remote Code Execution via Repo.init

- Severity: High 7.7 (CVSS:4.0, scored by VulnCheck) `CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- 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): 0.83%, higher than 55% of CVEs (2026-11-30)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-08-07T15:36:43.000Z
- Modified: 2026-10-08T15:25:00.661Z
- Also known as: GHSA-9rj7-rf2p-w77r, PYSEC-2026-3840
- Weaknesses: CWE-88, CWE-94
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: VulnCheck

## Description

GitPython before 3.1.58 contains a remote code execution vulnerability in Repo.init that forwards unsafe git options without validation. Attackers can supply a template parameter pointing to a directory with malicious git hooks that execute arbitrary code when git operations are performed on the initialized repository.

(As written by CVE List.)

## Affected

- gitpython-developers GitPython: before 3.1.58 (not affected: 3.1.58)
- gitpython (PyPI): before 3.1.58
- gitpython_project gitpython: before 3.1.58

## Every score

- VulnCheck: CVSS:4.0 7.7 High `CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- VulnCheck: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-9rj7-rf2p-w77r> (exploit, vendor-advisory, web)
- <https://www.vulncheck.com/advisories/gitpython-before-remote-code-execution-via-repo-init> (third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-76218> (advisory)
- <https://github.com/gitpython-developers/GitPython/pull/2204> (web)
- <https://github.com/gitpython-developers/GitPython/commit/d9ddb55bdc66> (web)
- <https://github.com/gitpython-developers/GitPython> (package)
- <https://github.com/gitpython-developers/GitPython/releases/tag/3.1.58> (web)
- <https://pypi.org/project/gitpython> (package)
- <https://github.com/advisories/GHSA-9rj7-rf2p-w77r> (advisory)

## Sources

- CVE List: [CVE-2026-76218](https://www.cve.org/CVERecord?id=CVE-2026-76218), CVE Terms of Use, modified 2026-10-08
- GitHub Advisory Database: [GHSA-9rj7-rf2p-w77r](https://github.com/advisories/GHSA-9rj7-rf2p-w77r), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-76218](https://nvd.nist.gov/vuln/detail/CVE-2026-76218), Public domain, modified 2026-09-03
- PyPA Advisory Database: [PYSEC-2026-3840](https://osv.dev/vulnerability/PYSEC-2026-3840), CC-BY-4.0, modified 2026-09-10

---

Page: https://cve.day/CVE-2026-76218 · Whole record: https://cve.day/CVE-2026-76218.json · Rebuilt by cve.day 2026-11-25T22:59:33.934Z
