Description
GitPython before 3.1.60 fails to properly validate the git directory location, allowing attackers to impersonate the git directory using tracked files like gitdir, commondir, and HEAD. Attackers can execute arbitrary code by placing a malicious pre-commit hook in the tracked hooks directory that executes when a victim calls index.commit() on a cloned or opened repository.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| gitpython-developers | GitPython | < 3.1.60 | 3.1.60 |
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 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 | — |
Show 4 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 | foreman +1 | 3.12.0.23-1.el8sat | RHSA-2026:74506, RHSA-2026:74505, RHSA-2026:74504 |
| Red Hat Satellite Utils 6 | rubygem-hammer_cli | 3.12.0-2.el8sat | RHSA-2026:74506, RHSA-2026:74505, RHSA-2026:74504 |
| Red Hat Satellite Utils 6 | satellite +1 | 6.16.14-1.el8sat | RHSA-2026:74506, RHSA-2026:74505, RHSA-2026:74504 |
| Red Hat Satellite Capsule 6 | foreman +2 | 3.12.0.23-1.el8sat | RHSA-2026:74506, RHSA-2026:74505, RHSA-2026:74504 |
| Red Hat Satellite Capsule 6 | pulpcore-obsolete-packages | 1.3.1-6.el9pc | RHSA-2026:74504 |
| Red Hat Satellite Capsule 6 | python-dynaconf +1 | 3.2.13-1.el8pc | RHSA-2026:74506, RHSA-2026:74505 |
| Red Hat Satellite Capsule 6 | python-gitpython +1 | 3.1.62-1.el8pc | RHSA-2026:74506, RHSA-2026:74505 |
| Red Hat Satellite Capsule 6 | python-lxml +1 | 4.9.2-5.el8pc | RHSA-2026:74506, RHSA-2026:74505 |
| Red Hat Satellite Capsule 6 | python-pulpcore +1 | 3.49.39-4.el8pc | RHSA-2026:74506 |
| Red Hat Satellite Capsule 6 | python-sqlparse +1 | 0.6.0-1.el8pc | RHSA-2026:74506, RHSA-2026:74505 |
| Red Hat Satellite Capsule 6 | python3.12-dynaconf | 3.2.13-2.el9pc | RHSA-2026:74504, RHSA-2026:74503 |
| Red Hat Satellite Capsule 6 | python3.12-gitpython | 3.1.62-1.el9pc | RHSA-2026:74504, RHSA-2026:74503 |
| Red Hat Satellite Capsule 6 | python3.12-sqlparse | 0.6.0-1.el9pc | RHSA-2026:74504, RHSA-2026:74503 |
| Red Hat Satellite Capsule 6 | satellite +2 | 6.16.14-1.el8sat | RHSA-2026:74506, RHSA-2026:74505, RHSA-2026:74504 |
| Red Hat Satellite Capsule 6 | satellite-obsolete-packages | 6.17.12-1.el9sat | RHSA-2026:74505, RHSA-2026:74504 |
| Red Hat Satellite 6 | foreman +14 | 3.12.0.23-1.el8sat | RHSA-2026:74506, RHSA-2026:74505, RHSA-2026:74504 |
| Red Hat Satellite 6 | pulpcore-obsolete-packages | 1.3.1-6.el9pc | RHSA-2026:74504 |
| Red Hat Satellite 6 | python-dynaconf +1 | 3.2.13-1.el8pc | RHSA-2026:74506, RHSA-2026:74505 |
| Red Hat Satellite 6 | python-gitpython +1 | 3.1.62-1.el8pc | RHSA-2026:74506, RHSA-2026:74505 |
| Red Hat Satellite 6 | python-lxml +1 | 4.9.2-5.el8pc | RHSA-2026:74506, RHSA-2026:74505 |
| Red Hat Satellite 6 | python-pulpcore +1 | 3.49.39-4.el8pc | RHSA-2026:74506 |
| Red Hat Satellite 6 | python-sqlparse +1 | 0.6.0-1.el8pc | RHSA-2026:74506, RHSA-2026:74505 |
| Red Hat Satellite 6 | python3.12-dynaconf | 3.2.13-2.el9pc | RHSA-2026:74504, RHSA-2026:74503 |
| Red Hat Satellite 6 | python3.12-gitpython | 3.1.62-1.el9pc | RHSA-2026:74504, RHSA-2026:74503 |
| Red Hat Satellite 6 | python3.12-sqlparse | 0.6.0-1.el9pc | RHSA-2026:74504, RHSA-2026:74503 |
| Red Hat Satellite 6 | rubygem-foreman_remote_execution +1 | 13.2.8-2.el8sat | RHSA-2026:74506, RHSA-2026:74505, RHSA-2026:74504 |
| Red Hat Satellite 6 | rubygem-hammer_cli | 3.12.0-2.el8sat | RHSA-2026:74506, RHSA-2026:74505, RHSA-2026:74504 |
| Red Hat Satellite 6 | rubygem-katello | 4.14.0.23-1.el8sat | RHSA-2026:74506, RHSA-2026:74505, RHSA-2026:74504 |
| Red Hat Satellite 6 | rubygem-safemode | 1.5.0-2.el8sat | RHSA-2026:74506, RHSA-2026:74505, RHSA-2026:74504 |
| Red Hat Satellite 6 | satellite +2 | 6.16.14-1.el8sat | RHSA-2026:74506, RHSA-2026:74505, RHSA-2026:74504 |
| Red Hat Satellite 6 | satellite-obsolete-packages | 6.17.12-1.el9sat | RHSA-2026:74505, RHSA-2026:74504 |
| Red Hat Satellite 6 | yggdrasil-worker-forwarder | 0.1.0-2.el8sat | RHSA-2026:74506, RHSA-2026:74505, RHSA-2026:74504 |
Show 3 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Red Hat Ansible Automation Platform Inside 2 | receptor | 1.6.8-1.el8ap | RHSA-2026:71114, RHSA-2026:71113 |
| Red Hat Ansible Automation Platform Developer 2 | automation-controller +1 | 4.7.17-1.el9ap | RHSA-2026:71113 |
| Red Hat Ansible Automation Platform Developer 2 | python-sqlparse +1 | 0.6.0-1.el10ap | RHSA-2026:71113 |
| Red Hat Ansible Automation Platform Developer 2 | python3.12-sqlparse | 0.6.0-1.el8ap | RHSA-2026:71114, RHSA-2026:71113 |
| Red Hat Ansible Automation Platform Developer 2 | receptor | 1.6.8-1.el8ap | RHSA-2026:71114, RHSA-2026:71113 |
| Red Hat Ansible Automation Platform 2 | automation-controller +3 | 4.7.17-1.el9ap | RHSA-2026:71113 |
| Red Hat Ansible Automation Platform 2 | automation-controller-venv-tower | 4.6.33-1.el8ap | RHSA-2026:71114, RHSA-2026:71113 |
| Red Hat Ansible Automation Platform 2 | automation-gateway-proxy-server | 2.5.10-8.el8ap | RHSA-2026:71114, RHSA-2026:71113 |
| Red Hat Ansible Automation Platform 2 | automation-gateway-server | 2.5.20260923-1.el8ap | RHSA-2026:71114 |
| Red Hat Ansible Automation Platform 2 | automation-platform-ui | 2.6.14-1.el9ap | RHSA-2026:71113 |
| Red Hat Ansible Automation Platform 2 | python-sqlparse +1 | 0.6.0-1.el10ap | RHSA-2026:71113 |
| Red Hat Ansible Automation Platform 2 | python3.12-gitpython | 3.1.60-1.el8ap | RHSA-2026:71114, RHSA-2026:71113 |
| Red Hat Ansible Automation Platform 2 | python3.12-sqlparse | 0.6.0-1.el8ap | RHSA-2026:71114, RHSA-2026:71113 |
| Red Hat Ansible Automation Platform 2 | receptor | 1.6.8-1.el8ap | RHSA-2026:71114, RHSA-2026:71113 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP6 | python-GitPython | 3.1.34.1693646983.2a2ae77-150400.9.11.1 | SUSE-SU-2026:4191-1 |
| SLES 15 SP5 | python-GitPython | 3.1.34.1693646983.2a2ae77-150400.9.11.1 | SUSE-SU-2026:4191-1 |
| SLES 15 SP4 | python-GitPython | 3.1.34.1693646983.2a2ae77-150400.9.11.1 | SUSE-SU-2026:4191-1 |
| SLES 3 | python-GitPython | 3.1.34.1693646983.2a2ae77-150400.9.11.1 | SUSE-SU-2026:4191-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.11.1 | SUSE-SU-2026:4191-1 |
| SLES for SAP 15 SP5 | python-GitPython | 3.1.34.1693646983.2a2ae77-150400.9.11.1 | SUSE-SU-2026:4191-1 |
| SLES for SAP 15 SP4 | python-GitPython | 3.1.34.1693646983.2a2ae77-150400.9.11.1 | SUSE-SU-2026:4191-1 |
| SLE HPC 15 SP5 | python-GitPython | 3.1.34.1693646983.2a2ae77-150400.9.11.1 | SUSE-SU-2026:4191-1 |
| SLE HPC 15 SP4 | python-GitPython | 3.1.34.1693646983.2a2ae77-150400.9.11.1 | SUSE-SU-2026:4191-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Leap 16.0 | python-GitPython | 3.1.44-160000.4.1 | openSUSE-SU-2026:21874-1 |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | gitpython | < 3.1.60 | 3.1.60 | GHSA-239g-whfq-7xj9 |
Advisories 10
- RHSA-2026:71114 Red Hat Security Advisory: Red Hat Ansible Automation Platform 2.5 Product Security and Bug Fix Update Red Hat Security Advisories (RHSA) · Nov 13, 2026
- RHSA-2026:71113 Red Hat Security Advisory: Red Hat Ansible Automation Platform 2.6 Product Security and Bug Fix Update Red Hat Security Advisories (RHSA) · Nov 13, 2026
- WID-SEC-2026-3555 Red Hat Ansible Automation Platform (automation-controller): Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 12, 2026
- WID-SEC-2026-4111 Red Hat Ansible Automation Platform: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 12, 2026
- RHSA-2026:74506 Red Hat Security Advisory: Satellite 6.16.14 Async Update Red Hat Security Advisories (RHSA) · Oct 20, 2026
- RHSA-2026:74504 Red Hat Security Advisory: Satellite 6.18.10 Async Update Red Hat Security Advisories (RHSA) · Oct 20, 2026
- RHSA-2026:74505 Red Hat Security Advisory: Satellite 6.17.12 Async Update Red Hat Security Advisories (RHSA) · Oct 20, 2026
- RHSA-2026:74503 Red Hat Security Advisory: Satellite 6.19.5 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:4191-1 Security update for python-GitPython SUSE / openSUSE Security Updates · Sep 16, 2026
References
- GitHub Security Advisory (GHSA-239g-whfq-7xj9) vendor-advisory
- VulnCheck Advisory: GitPython before 3.1.60 Remote Code Execution via Git Directory Impersonation third-party-advisory