Skip to main content
VulnerabilityPublished Updated

CVE-2026-67325: GitPython · Command Injection via git long-option prefix abbreviation bypass of CVE-2026-42215 blocklist

Affects GitPythonSource GCVE Database

0

Mentioned vulnerabilities

CVSS 8.8 High : upgrade to 3.1.51 soon.

Data as of 26 Oct 2026, 16:10 UTC

CVSS 3.1 base score
8.8High
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 3.1.51
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

What to do

Upgrade GitPython to 3.1.51.

Affected software

ProductAffectedFixed in
PyPIGitPythonAffected
  • <3.1.51
Fixed in
  • 3.1.51

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

If you cannot patch yet, users should avoid passing untrusted or attacker-controlled keyword argument keys to GitPython's clone, fetch, pull, or push methods. The vulnerability is a bypass of the existing blocklist, so relying on allow_unsafe_options=False alone is insufficient. Monitoring for updates from the GitPython maintainers and applying any forthcoming official fixes is recommended.

Description

GitPython contains a command injection vulnerability due to incomplete blocking of unsafe git options. The fix for CVE-2026-42215 implemented a blocklist for dangerous git options but did not account for git's acceptance of unambiguous long-option prefix abbreviations. This allows attackers to bypass the blocklist by using abbreviated option keys, leading to command injection when GitPython emits these options to git commands. The vulnerability affects all versions carrying the 3.1.47 blocklist fix through versions before 3.1.51. Exploitation requires a host application that passes attacker-controlled keyword argument keys to GitPython's clone, fetch, pull, or push methods. The severity is high, reflecting potential remote code execution impact.

References

Community reviews

Loading reviews…