Impact
GitPython before version 3.1.51 contains an incomplete command injection blocklist that fails to consider git’s long‑option prefix abbreviation feature. Attackers can circumvent the guard by supplying abbreviated option names such as "upload_p" instead of the intended "upload_pack", which git resolves to a dangerous option and executes arbitrary commands. This flaw is a CWE‑78 Command Injection vulnerability, permitting an attacker to inject shell commands that run with the privileges of the Python process, potentially compromising confidentiality, integrity, or availability.
Affected Systems
The vulnerability affects the GitPython library developed by gitpython‑developers. All releases older than 3.1.51 are impacted, including the commonly used 3.1.x and 3.0.x series. Systems that incorporate these older GitPython versions should be considered at risk.
Risk and Exploitability
The CVSS score of 8.7 marks this weakness as a high‑severity issue. EPSS score of 1.48% indicates a low but nonzero likelihood of exploitation, and the vulnerability is not listed in CISA's KEV catalog, but the lack of a blocklist and reliance on git’s option abbreviation make exploitation feasible when an attacker can influence git command options. The risk is elevated where GitPython is invoked with untrusted input or network‑exposed repositories, and the vulnerability provides a clear path to remote code execution. Based on the description, the likely attack vector is crafting git command options that employ abbreviated names, which is inferred because GitPython passes these options directly to the underlying git binary.
OpenCVE Enrichment