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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| gitpython-developers | GitPython | < 3.1.58 | 3.1.58 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | python-git | 3.1.61-1 | — |
| Debian 13 | python-git | 3.1.44-1+deb13u1 | — |
| Debian 12 | python-git | 3.1.30-1+deb12u3 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | python-git | No fix yet | — |
Show 7 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 26.04 LTS | python-git | No fix yet | — |
| Ubuntu Pro 24.04 LTS | python-git | No fix yet | — |
| Ubuntu Pro 22.04 LTS | python-git | No fix yet | — |
| Ubuntu Pro 20.04 LTS | python-git | No fix yet | — |
| Ubuntu Pro 18.04 LTS | python-git | No fix yet | — |
| Ubuntu Pro 16.04 LTS | python-git | No fix yet | — |
| Ubuntu Pro 14.04 LTS | python-git | No fix yet | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Red Hat Satellite Utils 6 | rubygem-jwt | 2.10.3-1.el9sat | RHSA-2026:63385 |
| Red Hat Satellite Maintenance 6 | ansible-core | 1:2.16.19-1.el9sat | RHSA-2026:63385 |
| Red Hat Satellite Capsule 6 | ansible-core +1 | 1:2.16.19-1.el9sat | RHSA-2026:63385 |
| Red Hat Satellite Capsule 6 | openvox-server | 8.15.2-1.el9sat | RHSA-2026:63385 |
| Red Hat Satellite Capsule 6 | python3.12-aiohttp | 3.14.3-1.el9pc | RHSA-2026:63385 |
| Red Hat Satellite Capsule 6 | python3.12-gitpython | 3.1.59-1.el9pc | RHSA-2026:63385 |
| Red Hat Satellite Capsule 6 | rubygem-jwt | 2.10.3-1.el9sat | RHSA-2026:63385 |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Red Hat Satellite 6 | ansible-core +1 | 1:2.16.19-1.el9sat | RHSA-2026:63385 |
| Red Hat Satellite 6 | openvox-server | 8.15.2-1.el9sat | RHSA-2026:63385 |
| Red Hat Satellite 6 | python3.12-aiohttp | 3.14.3-1.el9pc | RHSA-2026:63385 |
| Red Hat Satellite 6 | python3.12-gitpython | 3.1.59-1.el9pc | RHSA-2026:63385 |
| Red Hat Satellite 6 | rubygem-jwt | 2.10.3-1.el9sat | RHSA-2026:63385 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP6 | python-GitPython | 3.1.34.1693646983.2a2ae77-150400.9.8.1 | SUSE-SU-2026:4072-1 |
| SLES 15 SP5 | python-GitPython | 3.1.34.1693646983.2a2ae77-150400.9.8.1 | SUSE-SU-2026:4072-1 |
| SLES 15 SP4 | python-GitPython | 3.1.34.1693646983.2a2ae77-150400.9.8.1 | SUSE-SU-2026:4072-1 |
| SLES 3 | python-GitPython | 3.1.34.1693646983.2a2ae77-150400.9.8.1 | SUSE-SU-2026:4072-1 |
Show 5 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 15 SP6 | python-GitPython | 3.1.34.1693646983.2a2ae77-150400.9.8.1 | SUSE-SU-2026:4072-1 |
| SLES for SAP 15 SP5 | python-GitPython | 3.1.34.1693646983.2a2ae77-150400.9.8.1 | SUSE-SU-2026:4072-1 |
| SLES for SAP 15 SP4 | python-GitPython | 3.1.34.1693646983.2a2ae77-150400.9.8.1 | SUSE-SU-2026:4072-1 |
| SLE HPC 15 SP5 | python-GitPython | 3.1.34.1693646983.2a2ae77-150400.9.8.1 | SUSE-SU-2026:4072-1 |
| SLE HPC 15 SP4 | python-GitPython | 3.1.34.1693646983.2a2ae77-150400.9.8.1 | SUSE-SU-2026:4072-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | python-GitPython | 3.1.59-2.1 | openSUSE-SU-2026:11566-1 |
| openSUSE Leap 16.0 | python-GitPython | 3.1.44-160000.4.1 | openSUSE-SU-2026:21874-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | py3-gitpython | 3.1.61-r0 | — |
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | checkov | 3.3.9-r1 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | gitpython | < 3.1.58 | 3.1.58 | GHSA-hmq2-w58f-27jc |
Advisories 5
- WID-SEC-2026-3555 Red Hat Ansible Automation Platform (automation-controller): Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 12, 2026
- RHSA-2026:63385 Red Hat Security Advisory: Satellite 6.19.4 Async Update Red Hat Security Advisories (RHSA) · Oct 20, 2026
- openSUSE-SU-2026:21874-1 Security update for python-GitPython SUSE / openSUSE Security Updates · Sep 25, 2026
- SUSE-SU-2026:4072-1 Security update for python-GitPython SUSE / openSUSE Security Updates · Sep 13, 2026
- openSUSE-SU-2026:11566-1 python313-GitPython-3.1.59-2.1 on GA media SUSE / openSUSE Security Updates · Aug 22, 2026
References
- GitHub Security Advisory (GHSA-hmq2-w58f-27jc) vendor-advisory
- VulnCheck Advisory: GitPython before 3.1.58 Path Traversal via .gitmodules Submodule Name third-party-advisory