Skip to main content

GitPython EUVDEUVD-2026-51808

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

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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
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
qualitative

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
X

Lifecycle Timeline

4
Source Code Evidence Fetched
Aug 01, 2026 - 13:04 vuln.today
Analysis Generated
Aug 01, 2026 - 13:04 vuln.today
Patch available
Aug 01, 2026 - 13:01 EUVD
CVE Published
Aug 01, 2026 - 12:22 cve.org
CRITICAL 9.3

Blast Radius

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

Ecosystem-wide dependent count for version 3.1.50.

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.

AnalysisAI

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.

Technical ContextAI

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.

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.

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-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-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-2023-40267 CRITICAL
9.8 Aug 11

GitPython before 3.1.32 does not block insecure non-multi options in clone and clone_from. Rated critical severity (CVSS

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-73625 HIGH
8.7 Aug 13

Remote code execution in GitPython before 3.1.54 exploits a guard bypass in check_unsafe_options where the validation lo

CVE-2026-76220 HIGH POC
8.7 Aug 19

Arbitrary OS command execution in GitPython before 3.1.58 is possible by bypassing the check_unsafe_options guard using

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-76221 HIGH
8.7 Aug 19

Config-name injection in GitPython <= 3.1.57 enables arbitrary git-config directive forgery and remote code execution vi

Vendor StatusVendor

Share

EUVD-2026-51808 vulnerability details – vuln.today

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