# CVE-2026-76222: GitPython before 3.1.58 Path Traversal via .gitmodules Submodule Name

- Severity: High 8.4 (CVSS:4.0, scored by VulnCheck) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:H/SA:L`
- 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.42%, higher than 28% of CVEs (2026-11-30)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-08-07T15:45:39.000Z
- Modified: 2026-10-08T15:25:02.909Z
- Also known as: GHSA-hmq2-w58f-27jc, PYSEC-2026-3784
- Weaknesses: CWE-22, CWE-73
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: VulnCheck

## Description

GitPython before 3.1.58 fails to validate submodule names from .gitmodules files, allowing attackers to create Git repositories at arbitrary filesystem paths outside the intended clone directory. Attackers can craft malicious repositories with traversal sequences in submodule names that GitPython processes during submodule initialization, creating attacker-controlled Git repositories at escaped filesystem locations.

(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 8.4 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:H/SA:L`
- VulnCheck: CVSS:3.1 8.2 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:L`
- GitHub: CVSS:3.1 8.2 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:L`
- PyPA Advisory Database: CVSS:4.0 `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:H/SA:L/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X`

## References

- <https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-hmq2-w58f-27jc> (exploit, evidence, vendor-advisory, web)
- <https://www.vulncheck.com/advisories/gitpython-before-path-traversal-via-gitmodules-submodule-name> (advisory, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-76222> (advisory)
- <https://github.com/gitpython-developers/GitPython/pull/2202> (web)
- <https://github.com/gitpython-developers/GitPython/commit/4299c990e1ca21896f9485277caf7bb0ae5b404c> (web)
- <https://github.com/gitpython-developers/GitPython/commit/e4b8e7d026ca6abb4cf604f8e77093432ce23c06> (web)
- <https://github.com/gitpython-developers/GitPython> (package)
- <https://github.com/gitpython-developers/GitPython/releases/tag/3.1.58> (web)
- <https://github.com/pypa/advisory-database/tree/main/vulns/gitpython/PYSEC-2026-3784.yaml> (web)

## Sources

- CVE List: [CVE-2026-76222](https://www.cve.org/CVERecord?id=CVE-2026-76222), CVE Terms of Use, modified 2026-10-08
- GitHub Advisory Database: [GHSA-hmq2-w58f-27jc](https://github.com/advisories/GHSA-hmq2-w58f-27jc), CC-BY-4.0, modified 2026-09-08
- NVD: [CVE-2026-76222](https://nvd.nist.gov/vuln/detail/CVE-2026-76222), Public domain, modified 2026-09-02
- PyPA Advisory Database: [PYSEC-2026-3784](https://osv.dev/vulnerability/PYSEC-2026-3784), CC-BY-4.0, modified 2026-09-03

---

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