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

- Priority: **Prioritise**
- Reason: Public exploit (GitHub, Date unknown)
- Next step: Check applicability: affected before 3.1.58 (CNA); fix release not confirmed
- Status: published
- Published: 2026-08-19 · Modified: 2026-10-08
- Aliases: GHSA-hmq2-w58f-27jc, PYSEC-2026-3784, UBUNTU-CVE-2026-76222, DEBIAN-CVE-2026-76222, CGA-4p4h-5q93-cm4p, CGA-cg7g-2p4p-h3wc, CGA-p4h9-g7xp-g34r, CGA-2459-vxvm-j4f8, CGA-4m9q-xxr8-rv22, CGA-fcgw-fhhw-hf47, CGA-qw63-r485-23hp, ALPINE-CVE-2026-76222
- Record: https://cvemate.com/vulnerability/CVE-2026-76222 · JSON: https://cvemate.com/vulnerability/CVE-2026-76222/json

## Description

```text
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.
```

## Signals

- CVSS: 8.4 high (v4.0, CVE.org) 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
- EPSS: 0.333%, percentile 28.597%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (github)

## Affected

- alpine py3-gitpython (Alpine Linux): \< 3.1.61-r0
- chainguard awx (Chainguard): \< 24.6.1-r49
- chainguard checkov (Chainguard): \< 3.3.9-r1
- chainguard mlflow (Chainguard): \< 3.16.0-r0
- chainguard opal (Chainguard): \< 0.9.6-r5
- wolfi checkov (Wolfi): \< 3.3.9-r1
- wolfi mlflow (Wolfi): \< 3.16.0-r0
- debian python-git (Debian): All versions (No fix recorded) \| \< 3.1.30-1+deb12u3 \| \< 3.1.44-1+deb13u1 \| \< 3.1.61-1
- ubuntu python-git (Ubuntu): All versions (No fix recorded)
- gitpython\_project gitpython: \< 3.1.58
- gitpython-developers gitpython: \< 3.1.58
- PyPI gitpython (PyPI): \< 3.1.58

## References

- <https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-hmq2-w58f-27jc>
- <https://www.vulncheck.com/advisories/gitpython-before-path-traversal-via-gitmodules-submodule-name>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-76222>
- <https://github.com/gitpython-developers/GitPython/pull/2202>
- <https://github.com/gitpython-developers/GitPython/commit/4299c990e1ca21896f9485277caf7bb0ae5b404c>
- <https://github.com/gitpython-developers/GitPython/commit/e4b8e7d026ca6abb4cf604f8e77093432ce23c06>
- <https://github.com/gitpython-developers/GitPython>
- <https://github.com/gitpython-developers/GitPython/releases/tag/3.1.58>
- <https://github.com/pypa/advisory-database/tree/main/vulns/gitpython/PYSEC-2026-3784.yaml>
- <https://ubuntu.com/security/CVE-2026-76222>
- <https://www.cve.org/CVERecord?id=CVE-2026-76222>
- <https://security-tracker.debian.org/tracker/CVE-2026-76222>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/76xxx/CVE-2026-76222.json>
- <https://security.alpinelinux.org/vuln/CVE-2026-76222>

---

Data as of 2026-12-05T04:46:56.407Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
