From version 3.1.30 to before version 3.1.47, GitPython blocks dangerous Git options such as --upload-pack and --receive-pack by default, but the equivalent Python kwargs upload_pack and receive_pack…
- CVSS
- 8.8High
- Chance of exploitation (EPSS)
- —
- Published
- May 7, 2026
- In the news
- 1 story
What to do
A serious command injection flaw in Gitpython that can be attacked over the network by someone with an account. No attacks are reported yet; it can go in your normal patch cycle.
Action: Apply the vendor's update or follow its advisory.
Fixed in: 3.1.47
Affected versions
- Gitpython
- 3.1.30 to before 3.1.47; >= 3.1.30, < 3.1.47
Description
GitPython is a python library used to interact with Git repositories. From version 3.1.30 to before version 3.1.47, GitPython blocks dangerous Git options such as --upload-pack and --receive-pack by default, but the equivalent Python kwargs upload_pack and receive_pack bypass that check. If an application passes attacker-controlled kwargs into Repo.clone_from(), Remote.fetch(), Remote.pull(), or Remote.push(), this leads to arbitrary command execution even when allow_unsafe_options is left at its default value of False. This issue has been patched in version 3.1.47.
Affected products
Get alerts for these →Timeline 5
Latest change: Tenable Cloud Security plugin 455466: Echo: python-git: security update to 3.1.47 (Nov 18, 2026)
News, advisories, exploit code, scanner detection and exploitation, newest first.
Thu, Nov 19, 2026
Sat, Oct 31, 2026
Tue, Oct 27, 2026
- ResearchGitPython: GitPython command wrappers omit unsafe protocol and option checksGitHub Advisories · 15:26 UTC
Thu, May 7, 2026
- CVECVE-2026-42215 published (CVSS 8.8)CVE Program · 19:16 UTC
References 3
- github.com Patch /gitpython-developers/GitPython/releases/tag/3.1.47
- github.com ExploitVendor Advisory /gitpython-developers/GitPython/security/advisories/GHSA-rpm5-65cw-6hj4
- github.com ExploitVendor Advisory /gitpython-developers/GitPython/security/advisories/GHSA-rpm5-65cw-6hj4