CVE-2026-76222
GitPython before 3.1.58 fails to validate submodule names from …
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.
What to do now
- Check your exposureFind out whether the affected software runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- github.com/gitpython-developers/GitPython/security/advisories/GHSA-hmq2-w58f-27jc
- www.vulncheck.com/advisories/gitpython-before-path-traversal-via-gitmodules-submodule-name
- github.com/gitpython-developers/GitPython/pull/2202
- github.com/gitpython-developers/GitPython/commit/4299c990e1ca21896f9485277caf7bb0ae5b404c
- github.com/gitpython-developers/GitPython/commit/e4b8e7d026ca6abb4cf604f8e77093432ce23c06
- github.com/gitpython-developers/GitPython/releases/tag/3.1.58
- nvd.nist.gov/vuln/detail/CVE-2026-76222
- github.com/pypa/advisory-database/tree/main/vulns/gitpython/PYSEC-2026-3784.yaml
- nvd.nist.gov/vuln/detail/CVE-2026-76222
- cve.org/CVERecord?id=CVE-2026-76222
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.