CVE-2026-67325
PoC massCommand Injection Bypass in GitPython via Abbreviated Git Options
CVE-2026-67325 is a command injection flaw (CWE-78) in GitPython, a Python library for running Git commands: versions before 3.1.51 use an incomplete blocklist of unsafe git options that does not account for git's long-option prefix abbreviation feature. An attacker triggers it by supplying an abbreviated option name such as 'upload_p' in place of 'upload_pack' in data that reaches GitPython's git command invocations; the abbreviated form evades the unsafe-options guard while git still resolves it to the dangerous option, enabling arbitrary command execution. Per the CVSS 4.0 vector (AV:N/AC:L/PR:L/UI:N), the attack is network-based, requires low privileges, and no user interaction, and successful exploitation yields high impact to confidentiality, integrity, and availability with the privileges of the process invoking GitPython. Any environment running GitPython versions before 3.1.51 installed via pip is affected, with risk concentrated in CI/CD pipelines, automation, and services that pass attacker-controlled repository data or arguments into git commands. There are no reports of in-the-wild exploitation (not listed in CISA KEV), EPSS is 1.9% over 30 days (78th percentile), and one public advisory/exploit reference exists (GHSA-2f96-g7mh-g2hx).
What to do: Upgrade to GitPython 3.1.51 or later, which closes the abbreviated-option bypass in the unsafe-options guard. Where patching is delayed, strictly validate and restrict attacker-controlled values (refs, URLs, and option strings) passed into GitPython commands so abbreviated long options cannot evade the blocklist. Given the public advisory reference and 1.9% EPSS, prioritize patching internet-facing or multi-tenant services that execute git operations on untrusted repository data.
| gitpython project gitpython | All versions before 3.1.51 |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
GitPython before 3.1.51 contains an incomplete command injection blocklist that fails to account for git's long-option prefix abbreviation feature. Attackers can bypass the unsafe options guard by using abbreviated option names like upload_p instead of upload_pack, which git resolves to dangerous options and executes arbitrary commands.
- Vendors
- gitpython project
- Products
- gitpython
- Ecosystems
- pip
- Weakness
- CWE-78
- Vector
- CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- GHSA
- GHSA-2f96-g7mh-g2hx (high)
In the news0 stories
No ingested article mentions this CVE yet.