CVE-2026-67325

GitPython before 3.1.51 Command Injection via option prefix abbreviation

Published Aug 1, 2026 CVSS 4.0 · 8.7 High EPSS 2.2% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical 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.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to GitPython version 3.1.51 or newer.
  • Configure the underlying git installation to reject unsafe options by disabling core.allowUnsafe or preventing long‑option prefix abbreviation.
  • Validate and whitelist only fully‑spelled git option names before they are passed to the library, ensuring that abbreviations cannot trigger dangerous commands.

Generated by OpenCVE AI on August 4, 2026 at 22:13 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4872-1 python-git security update
Github GHSA Github GHSA GHSA-2f96-g7mh-g2hx GitPython: Command Injection via git long-option prefix abbreviation bypass of CVE-2026-42215 blocklist
History
Type Values Removed Values Added
First Time appeared Gitpython Project
Gitpython Project gitpython
CPEs cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:python:*:*
Vendors & Products Gitpython Project
Gitpython Project gitpython
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Redhat
Redhat hummingbird
CPEs cpe:/a:redhat:hummingbird:1
Vendors & Products Redhat
Redhat hummingbird
References
Metrics threat_severity

None

threat_severity

Important

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Gitpython-developers
Gitpython-developers gitpython
Vendors & Products Gitpython-developers
Gitpython-developers gitpython
Type Values Removed Values Added
Description 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.
Title GitPython before 3.1.51 Command Injection via option prefix abbreviation
Weaknesses CWE-78
References
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 8.7, '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'}

Weaknesses
  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Oct 8, 2026, 3:24 PM
Reserved
Jul 29, 2026, 1:07 PM
Status
Analyzed
Published
Aug 1, 2026, 1:17 PM
Modified
Oct 23, 2026, 11:10 PM
Severity
Important
Public date
Aug 1, 2026, 12:22 PM