Skip to main content

GitPython CVE-2026-67324

| EUVDEUVD-2026-51808 CRITICAL
OS Command Injection (CWE-78)
2026-08-01 VulnCheck GHSA-cw2r-r7mw-j3hc
9.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Attacker controls clone-option input to app
  2. Delivery
    Inject -u<helper> joined short option
  3. Exploit
    Gate fails to canonicalize short form
  4. Execution
    Git treats it as --upload-pack=<helper>
  5. Persist
    Helper executes during clone
  6. Impact
    Command execution as service account

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 an application that passes attacker-influenced clone options into Repo.clone_from(..., multi_options=...) while relying on GitPython's default gate (allow_unsafe_options=False) to block command-executing options; the attacker must be able to inject a token of the exact joined short form -u<helper> where <helper> resolves to an executable command git runs during clone. What limits exploitation: if the application never exposes multi_options to untrusted input, hardcodes/allowlists options, or explicitly sets allow_unsafe_options handling, the path is closed; the attacker must also control or plant the helper the -u value points to (local path or reachable executable). No end-user interaction or authentication against GitPython itself is needed, but the vulnerability is only reachable through this non-default application coding pattern, not against GitPython in isolation.

Impact

The supplied CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H, base 9.3) reflects the maximal case where attacker-controlled input reaches multi_options with no authentication or user interaction, and successful exploitation grants full command execution. That severity is real only under a specific application pattern: the consuming application must pass attacker-influenced clone options into Repo.clone_from while relying on the default gate - GitPython alone is not remotely exploitable without such wiring, so the practical attack complexity is higher than AC:L implies for many deployments. Publicly available exploit code exists (VulnCheck local PoC with sentinel proof), which raises priority, but there is no KEV listing and no EPSS score provided, so widespread automated exploitation is unproven and likely dependent on how each application uses the library. Net: treat as high priority for any product that funnels untrusted values into GitPython clone options, and lower urgency where multi_options is only ever fixed/trusted; verify your own call sites rather than assuming exposure from the CVSS number alone.

Exploit ScenarioDerived

A web service lets users submit a repository URL and pass-through clone flags, forwarding them into Repo.clone_from(url, multi_options=user_options, allow_unsafe_options=False) trusting the gate to block dangerous options. The attacker supplies -u/tmp/evil.sh (or a network-reachable helper), which slips past the gate as an unrecognized short option, and git executes it during clone as the service account. A public PoC from VulnCheck demonstrates this locally, writing a sentinel file to prove the helper ran despite allow_unsafe_options=False.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.4% 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 execution in GitPython 3.1.50 arises because its default unsafe-option gate fails to recognize joined short-option syntax, letting an attacker who controls clone options smuggle -u<helper> (the short form of --upload-pack=<helper>) past the block on --upload-pack/-u. Applications calling Repo.clone_from with attacker-influenced multi_options and allow_unsafe_options=False are affected, allowing Git to execute an arbitrary helper command during clone despite the safety gate being active. Reported by VulnCheck with a working local proof-of-concept; publicly available exploit code exists, but there is no public exploit identified as used in active attacks and it is not in CISA KEV.

RemediationAI

Vendor-released patch: upgrade GitPython to 3.1.51, which corrects the option-canonicalization so joined short forms like -u<value> are recognized and blocked by the default gate (see the fix in PR https://github.com/gitpython-developers/GitPython/pull/2162 and advisory GHSA-v396-v7q4-x2qj). If you cannot upgrade immediately, do not pass untrusted or attacker-influenced values into Repo.clone_from(..., multi_options=...); sanitize or allowlist clone options and reject any token beginning with -u, --upload-pack, -c, or --config (including joined short forms), accepting the trade-off that legitimate use of those options will be refused. As a defense-in-depth measure, run clone operations under a low-privilege account or sandbox so that any helper git executes has minimal blast radius, noting this contains rather than prevents the bypass.

Affected VersionsENISA

GitPython 3.1.50 <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 is a Python library that wraps the git command-line binary, and Repo.clone_from(...) forwards caller-supplied flags to git clone via multi_options. To prevent option-injection, GitPython maintains Repo.unsafe_git_clone_options listing --upload-pack, -u, --config, and -c, and enforces it through Git.check_unsafe_options unless allow_unsafe_options=True. The root cause is CWE-78 (OS Command Injection) via incomplete input neutralization: _clone() runs shlex.split(' '.join(multi_options)) and then _canonicalize_option_name('-u/path/to/helper') returns a token beginning with 'u...' rather than the canonical short option 'u', so it never matches the blocked '-u' entry. Because git natively accepts -u<upload-pack> as the joined short form of --upload-pack=<upload-pack>, and upload-pack designates an executable git runs during clone, the bypass yields direct command execution. Affected CPE is cpe:2.3:a:gitpython-developers:gitpython.

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 9.3 CRITICAL
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 8.1 HIGH

Full command execution yields C/I/A:H; AC:H because exploitation depends on a non-default application pattern passing untrusted options into multi_options, and PR:N/UI:N since no GitPython-level auth or interaction is required.

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

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
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
CRITICAL 9.3

DescriptionCVE.org

GitPython 3.1.50 fails to recognize joined short-option forms such as -u<value> (the short form of --upload-pack=<value>) when enforcing its default unsafe-option gate. When an application passes attacker-influenced clone options into Repo.clone_from(..., multi_options=..., allow_unsafe_options=False), an attacker can supply -u<helper> to bypass the gate that blocks --upload-pack/-u, causing Git to execute the specified helper command during clone. Fixed in 3.1.51.

Blast Radius

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

Ecosystem-wide dependent count for version 3.1.50.

Executive ViewAI

Why It Matters

GitPython versions up to 3.1.50 contain a critical remote command execution vulnerability in repository cloning operations where publicly available exploit code exists. Applications processing untrusted clone parameters are immediately at risk of compromise. Organizations must prioritize patching to prevent unauthorized code execution and potential supply chain attacks against systems using GitPython for repository operations.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.4%
Top 69% exploitable
Prevalence
High
very widely used Python git-wrapper library across tooling and CI
Social Media
3
Sightings
Data Quality
8 sources
Confidence: High

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 CRITICAL
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
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
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +46
PoC: 0
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-67325 HIGH POC
8.7 Aug 01

Command injection in GitPython before 3.1.51 allows low-privileged attackers to bypass the `check_unsafe_options` blockl

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

Vendor StatusVendor

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