Skip to main content

GitPython CVE-2026-67325

| EUVDEUVD-2026-51858 HIGH
OS Command Injection (CWE-78)
8.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate to GitPython-consuming application
  2. Delivery
    Submit request with abbreviated unsafe option kwarg (e.g., upload_p=<cmd>)
  3. Exploit
    GitPython check_unsafe_options performs exact-match lookup, finds no blocklist hit
  4. Execution
    Abbreviated option emitted to git binary as --upload-p=<cmd>
  5. Persist
    Git resolves prefix abbreviation to --upload-pack
  6. Impact
    Attacker-controlled command executes on server

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK

2 techniques across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires a low-privileged authenticated session on an application that consumes GitPython (PR:L per CVSS 4.0), and critically, that application must pass user-controlled values as option keyword argument names to GitPython's git network operations (clone, fetch, pull, or push). The specific condition is that user input must reach GitPython option kwargs without the application independently sanitizing or allowlisting those kwarg names before forwarding them. Exploitation is limited by: (1) at least low-level authenticated access to the consuming application is required - unauthenticated remote exploitation is not supported by the CVSS vector; (2) the application must expose a code path where user-controlled strings become option kwarg keys passed to GitPython; (3) only git operations that invoke the blocked options (clone with --upload-pack/--config/-c/-u, fetch/pull with --upload-pack, push with --receive-pack/--exec) are exploitable surfaces. The default allow_unsafe_options=False configuration provides no protection against abbreviated option names.

Impact

The CVSS 4.0 score of 8.7 (AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N) accurately reflects a high-severity but access-constrained vulnerability: low privileges are required (PR:L), meaning the attacker must hold an authenticated session on the consuming application. Attack complexity is low once the prefix abbreviation pattern is understood, and the GHSA advisory discloses the exact code path and bypass mechanism. No CISA KEV listing exists and no confirmed public exploit code was identified, but the advisory's technical depth substantially reduces time-to-exploit. EPSS data is unavailable for this newly assigned CVE, so exploitation probability cannot be quantified numerically. Real-world risk is highly deployment-dependent: applications that accept user-supplied option kwargs and forward them to GitPython clone, fetch, pull, or push operations are directly exploitable, while applications that generate all option names internally are unaffected. Hosted CI/CD platforms, code collaboration tools, and repository managers represent the highest-risk deployment profiles.

Exploit ScenarioDerived

A low-privileged authenticated user of a hosted code collaboration platform submits a repository clone request supplying the option kwarg upload_p with a value pointing to a malicious shell command. GitPython's check_unsafe_options canonicalizes upload_p to upload-p, finds no exact match in the blocklist dict, and passes it through; git receives --upload-p=<malicious_command> and resolves the prefix abbreviation to --upload-pack, executing the attacker-specified command under the application's process context. No confirmed public exploit code exists, but the GHSA advisory's source-level disclosure makes construction of a functional proof-of-concept straightforward.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 1.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 01, 2026

Command injection in GitPython before 3.1.51 allows low-privileged attackers to bypass the check_unsafe_options blocklist by supplying abbreviated git option names that git's CLI resolves to dangerous long-options at runtime. This is an incomplete fix of CVE-2026-42215 (patched in 3.1.47): the guard canonicalizes only underscore-to-hyphen but does not model git's unambiguous long-option prefix abbreviation feature, so a kwarg like upload_p passes the blocklist unchanged yet arrives at git as --upload-pack, enabling arbitrary command execution. No CISA KEV listing or confirmed public exploit code was identified at time of analysis, though the GHSA advisory includes precise source code and sufficient technical detail to substantially lower exploitation barrier.

RemediationAI

The primary fix is upgrading GitPython to version 3.1.51 or later via pip (pip install --upgrade 'GitPython>=3.1.51'); the fix is implemented in commit 56806080c1348749b07daa4a2024ce47b3cad285 and merged via PR https://github.com/gitpython-developers/GitPython/pull/2161. If immediate upgrade is not possible, audit all call sites in the consuming application that pass user-controlled input as option kwargs to GitPython's clone, fetch, pull, or push methods, and replace blocklist-based filtering with an explicit allowlist of permitted safe option names - blocklist approaches are structurally fragile against this class of parser asymmetry. Relying on the default allow_unsafe_options=False setting alone provides no protection against abbreviated names and must not be treated as a compensating control. Restricting network-reachable endpoints that invoke GitPython with user-supplied parameters is a viable short-term mitigation but may degrade application functionality. Full advisory: https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-2f96-g7mh-g2hx.

Affected VersionsENISA

GitPython 0 <3.1.51

Affected Packages

pypi gitpython fix: 3.1.51

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

GitPython (PyPI package, CPE cpe:2.3:a:gitpython-developers:gitpython:*:*:*:*:*:*:*:*) is a Python library for programmatic git operations. The vulnerable code is in git/cmd.py, specifically the check_unsafe_options() classmethod introduced in 3.1.47 as the fix for CVE-2026-42215. The root cause is CWE-184 (Incomplete List of Disallowed Inputs) cascading to CWE-78 (OS Command Injection): the guard applies only dashify() (underscore-to-hyphen normalization) before performing an exact dict lookup against blocked option names like --upload-pack, --config, -c, --receive-pack, and --exec. However, git's CLI parser accepts any unambiguous prefix of a long option - so --upload-p, --upload-pa, and --upload-pac all resolve to --upload-pack at the git binary level. GitPython's exact-match dict check never sees the full canonical name, so abbreviated kwargs pass the guard and are emitted to git verbatim, where git expands them to the dangerous option and executes the attacker-specified value as a command.

Know when Gitpython gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 8.7 HIGH
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
vuln.today AI 8.8 HIGH

Network vector with low complexity reflects indirect exploitation through the application layer; PR:L consistent with CVSS 4.0 input; no scope change as command execution is contained within the vulnerable system.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE 8.8 HIGH
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Red Hat 8.8 HIGH

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Aug 01, 2026 - 13:01 EUVD
CVE Published
Aug 01, 2026 - 12:22 cve.org
HIGH 8.7

DescriptionCVE.org

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.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 2 pypi packages depend on gitpython (2 direct, 0 indirect)

Ecosystem-wide dependent count for version 3.1.51.

Executive ViewAI

Why It Matters

GitPython versions before 3.1.51 contain a vulnerability allowing arbitrary code execution on systems using automated git operations-affecting CI/CD pipelines, deployment infrastructure, and development tools across the organization. This is an incomplete remediation of a prior vulnerability in the same library, suggesting ongoing security gaps in this critical dependency. Prompt patching is essential to prevent unauthorized access to repositories, build systems, and production infrastructure.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
1.5%
Top 29% exploitable
Prevalence
Medium
popular Python library widely used in developer tooling and CI/CD platforms
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Data Quality
8 sources
Confidence: High
EUVD 🇯🇵JVN NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 1.5%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

65
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +44
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

OS command injection occurs when an application passes unsanitized user input directly into system shell commands.

CVE-2022-24439 CRITICAL POC
9.8 Dec 06

All versions of package gitpython are vulnerable to Remote Code Execution (RCE) due to improper user input validation, w

CVE-2026-78676 CRITICAL POC
9.3 Aug 25

Arbitrary code execution in GitPython before 3.1.59 arises from unsafe re-serialization of multi-line, quoted git-config

CVE-2026-42215 HIGH POC
8.8 May 07

Command injection in GitPython 3.1.30-3.1.46 allows remote authenticated attackers to execute arbitrary commands via und

CVE-2026-67323 HIGH POC
8.6 Aug 01

Command injection and arbitrary file overwrite in GitPython before 3.1.51 expose applications that pass attacker-control

CVE-2026-78677 HIGH POC
8.7 Aug 25

Arbitrary directory creation and potential hook-based code execution in GitPython affects all releases before 3.1.59. Th

CVE-2026-67322 HIGH POC
8.7 Aug 01

Environment variable exfiltration in GitPython before 3.1.52 allows any attacker who controls a URL passed to `Repo.clon

CVE-2026-78675 HIGH POC
8.6 Aug 25

GitPython before 3.1.59 discloses local file content through exception messages when parsing .gitmodules files that cont

CVE-2023-40590 HIGH POC
7.8 Aug 28

GitPython is a python library used to interact with Git repositories. Rated high severity (CVSS 7.8), this vulnerability

CVE-2026-78679 HIGH POC
7.1 Aug 25

Arbitrary file read in GitPython before 3.1.59 allows low-privileged remote attackers to exfiltrate sensitive files by s

CVE-2026-78678 HIGH POC
7.1 Aug 25

Arbitrary file read in GitPython versions before 3.1.59 exposes sensitive filesystem content to low-privileged network a

CVE-2023-41040 MEDIUM POC
6.5 Aug 30

GitPython is a python library used to interact with Git repositories. Rated medium severity (CVSS 6.5), this vulnerabili

CVE-2026-42284 CRITICAL
9.8 May 07

Argument injection in GitPython's clone helpers lets an attacker-controlled multi_options string slip past the unsafe-op

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Affected
SUSE Linux Enterprise Module for Python 3 15 SP7 Affected
SUSE Linux Enterprise Server 15 SP7 Affected
SUSE Linux Enterprise Server 16.0 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy