# CVE-2026-76217: GitPython before 3.1.58 Arbitrary File Read via pathspec-from-file

- Severity: High 7.1 (CVSS:4.0, scored by VulnCheck) `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/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.36%, higher than 31% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-08-07T15:43:56.000Z
- Modified: 2026-10-08T15:25:00.070Z
- Also known as: GHSA-hh9p-6wh2-4mfc, PYSEC-2026-3841
- Weaknesses: CWE-73, CWE-200
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: VulnCheck

## Description

GitPython versions before 3.1.58 fail to validate options passed to git rm and git checkout commands in IndexFile.remove() and Head.checkout(). Attackers can supply --pathspec-from-file and --pathspec-file-nul parameters to read arbitrary files accessible to the process, with full file contents returned in GitCommandError.stderr.

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

## References

- <https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-hh9p-6wh2-4mfc> (exploit, vendor-advisory, web)
- <https://www.vulncheck.com/advisories/gitpython-before-arbitrary-file-read-via-pathspec-from-file> (third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-76217> (advisory)
- <https://github.com/gitpython-developers/GitPython/pull/2204> (web)
- <https://github.com/gitpython-developers/GitPython/commit/f2550b65bf60ca087190981e2c7b6865e201f40c> (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-hh9p-6wh2-4mfc> (advisory)

## Sources

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

---

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