Description
All versions of package gitpython are vulnerable to Remote Code Execution (RCE) due to improper user input validation, which makes it possible to inject a maliciously crafted remote URL into the clone command. Exploiting this vulnerability is possible because the library makes external calls to git without sufficient sanitization of input arguments.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| — | GitPython | < unspecified | unspecified |
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.30-1 | — |
| Debian 13 | python-git | 3.1.30-1 | — |
| Debian 12 | python-git | 3.1.30-1 | — |
| Debian 11 | python-git | 3.1.14-1+deb11u1 | DLA-3939-1 |
| Debian 10 | python-git | 2.1.11-1+deb10u1 | DLA-3502-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 22.04 LTS | python-git | 3.1.24-1ubuntu0.1~esm1 | USN-5968-1 |
| Ubuntu Pro 20.04 LTS | python-git | 3.0.7-1ubuntu0.1~esm1 | USN-5968-1 |
| Ubuntu Pro 18.04 LTS | python-git | 2.1.8-1ubuntu0.1~esm1 | USN-5968-1 |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 16.04 LTS | python-git | 1.0.1+git137-gc8b8379-2.1ubuntu0.1~esm1 | USN-5968-1 |
| Ubuntu Pro 14.04 LTS | python-git | 0.3.2~RC1-3ubuntu0.1~esm1 | USN-5968-1 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Red Hat Satellite Utils 6 | foreman +1 | 3.5.1.23-1.el8sat | RHSA-2023:5931 |
| Red Hat Satellite Capsule 6 | foreman +1 | 3.5.1.23-1.el8sat | RHSA-2023:5931 |
| Red Hat Satellite Capsule 6 | puppet-agent | 7.26.0-3.el8sat | RHSA-2023:5931 |
| Red Hat Satellite Capsule 6 | python-django +1 | 3.2.21-1.el8pc | RHSA-2023:5931 |
| Red Hat Satellite Capsule 6 | python-gitpython +1 | 3.1.32-1.el8pc | RHSA-2023:5931 |
| Red Hat Satellite 6 | foreman +12 | 3.5.1.23-1.el8sat | RHSA-2023:5931 |
| Red Hat Satellite 6 | puppet-agent | 7.26.0-3.el8sat | RHSA-2023:5931 |
| Red Hat Satellite 6 | python-django +1 | 3.2.21-1.el8pc | RHSA-2023:5931 |
| Red Hat Satellite 6 | python-gitpython +1 | 3.1.32-1.el8pc | RHSA-2023:5931 |
| Red Hat Satellite 6 | rubygem-git | 1.18.0-1.el8sat | RHSA-2023:5931 |
| Red Hat Satellite 6 | yggdrasil-worker-forwarder | 0.0.3-1.el8sat | RHSA-2023:5931 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | python-GitPython | 3.1.44-1.1 | openSUSE-SU-2025:14858-1 |
| openSUSE Tumbleweed | python3-bandit | 1.7.6-1.1 | openSUSE-SU-2024:13510-1 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
GitHub 2 repositories
-
Makkkiiii/GitPython-Exploit-CVE-2022-24439 ★ 1 · Jul 12, 2025
Method I used for my Practical Pentest Module.
-
muhammadhendro/CVE-2022-24439 ★ 0 · Oct 16, 2024
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | gitpython | < 3.1.30 | 3.1.30 | GHSA-hcpj-qp55-gfph |
Advisories 6
- RHSA-2023:5931 Red Hat Security Advisory: Satellite 6.13.5 Async Security Update Red Hat Security Advisories (RHSA) · Oct 20, 2026
- USN-5968-1 python-git vulnerability Ubuntu Security Notices (USN) · Jun 29, 2026
- DLA-3939-1 python-git - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-3502-1 python-git - security update Debian Security (DSA / DLA) · Mar 9, 2026
- openSUSE-SU-2024:13510-1 python3-bandit-1.7.6-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2025:14858-1 python311-GitPython-3.1.44-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
References
- https://security.snyk.io/vuln/SNYK-PYTHON-GITPYTHON-3113858
- https://github.com/gitpython-developers/GitPython/blob/bec61576ae75803bc4e60d8de7a629c194313d1c/git/repo/base.py%23L1249
- FEDORA-2022-8146a727a8 vendor-advisory
- FEDORA-2022-ce7369b9ec vendor-advisory
- [debian-lts-announce] 20230725 [SECURITY] [DLA 3502-1] python-git security update mailing-list
- FEDORA-2023-1ec4e542f9 vendor-advisory
- FEDORA-2023-26116901d9 vendor-advisory
- GLSA-202311-01 vendor-advisory