# CVE-2026-76219: GitPython before 3.1.58 Arbitrary File Overwrite via read-tree

- Severity: High 7.2 (CVSS:4.0, scored by VulnCheck) `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/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.54%, higher than 39% of CVEs (2026-11-30)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-08-07T15:33:57.000Z
- Modified: 2026-10-08T15:25:01.192Z
- Also known as: GHSA-4gmw-gg2m-w46p, PYSEC-2026-3838
- Weaknesses: CWE-88
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: VulnCheck

## Description

GitPython versions before 3.1.58 contain an arbitrary file overwrite vulnerability in IndexFile.from_tree, IndexFile.reset, and IndexFile.merge_tree methods that append caller-influenced treeish strings to git read-tree without option validation or argument separation. Attackers can inject the --index-output option to overwrite arbitrary files with a valid git-index blob, destroying existing file content at attacker-controlled writable paths.

(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.2 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N`
- VulnCheck: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H`
- GitHub: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H`

## References

- <https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-4gmw-gg2m-w46p> (exploit, vendor-advisory, web)
- <https://www.vulncheck.com/advisories/gitpython-before-arbitrary-file-overwrite-via-read-tree> (third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-76219> (advisory)
- <https://github.com/gitpython-developers/GitPython/pull/2204> (web)
- <https://github.com/gitpython-developers/GitPython/commit/9b5dcaf85da5946dbf69dcd53f9edba08f760b32> (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-4gmw-gg2m-w46p> (advisory)

## Sources

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

---

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