Skip to main content

GitPython EUVDEUVD-2026-51855

| CVE-2026-67322 HIGH
Information Exposure (CWE-200)
8.7
CVSS 4.0 · Vendor: VulnCheck
Share

Severity by source

Vendor (VulnCheck) PRIMARY
8.7 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/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
7.5 HIGH

Network-exploitable via attacker-supplied URL; no privileges, authentication, or interaction required; high confidentiality loss from env var exfiltration; no integrity or availability impact.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
SUSE
7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Red Hat
7.5 HIGH
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:19 vuln.today
Analysis Generated
Aug 01, 2026 - 13:19 vuln.today
Patch available
Aug 01, 2026 - 13:01 EUVD
CVE Published
Aug 01, 2026 - 12:22 cve.org
HIGH 8.7

Blast Radius

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

Ecosystem-wide dependent count for version 3.1.52.

DescriptionCVE.org

GitPython before 3.1.52 is vulnerable to environment-variable exfiltration in Repo.clone_from(). The caller-supplied remote URL is passed through Git.polish_url(), which on non-Cygwin platforms calls os.path.expandvars() on the URL before invoking git clone. An attacker who controls the clone URL can embed $NAME or ${NAME} tokens that are expanded to the values of the hosting process's environment variables (e.g., AWS_SECRET_ACCESS_KEY or GITHUB_TOKEN). The resulting URL, now containing the secret, is transmitted over the network to an attacker-controlled host during the clone attempt, disclosing the secret.

AnalysisAI

Environment variable exfiltration in GitPython before 3.1.52 allows any attacker who controls a URL passed to Repo.clone_from() to steal secrets from the hosting process's environment. The Git.polish_url() method unconditionally calls os.path.expandvars() on caller-supplied URLs on all non-Cygwin platforms, expanding tokens like $AWS_SECRET_ACCESS_KEY or ${GITHUB_TOKEN} before passing the resulting URL to a git clone subprocess - transmitting the expanded secret over the network to an attacker-controlled host. No public exploit code or CISA KEV listing has been identified at time of analysis, but the attack is trivial to weaponize against CI servers, git-hosting mirrors, and dependency scanners that accept user-supplied repository URLs.

Technical ContextAI

GitPython (PyPI: gitpython, CPE: cpe:2.3:a:gitpython-developers:gitpython:*:*:*:*:*:*:*:*) is a Python library providing a high-level interface to Git repositories. The vulnerability originates in Git.polish_url() (git/cmd.py, line 921, v3.1.50) which unconditionally invokes Python's os.path.expandvars() on the input URL on every non-Cygwin platform. This function replaces $NAME and ${NAME} shell-variable tokens with their values from the current process environment. Because Repo._clone() - the backend for both the public Repo.clone_from() and Repo.clone() - runs the unsafe-protocol check on the *raw* URL and then passes the *post-expansion* polished URL to the git clone subprocess, the secret is embedded in the URL before the network connection is made. The root cause class is CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor): a trust boundary violation where untrusted input (the caller-supplied URL) is able to read and then transmit trusted data (process environment variables) to an attacker-controlled destination.

RemediationAI

Upgrade gitpython to version 3.1.52 or later using pip install --upgrade gitpython. The fix is delivered via upstream PR #2172 (https://github.com/gitpython-developers/GitPython/pull/2172) and commit 8ac5a30519b6f4af85398b9b9d7064ff4d452da2; version 3.1.52 is confirmed as the patched release per package advisory data. If an immediate upgrade is not possible, the primary compensating control is to sanitize or reject any URL containing $ or % characters before passing it to Repo.clone_from() - note that this may break legitimate URLs with percent-encoded characters and should be implemented carefully with allowlist logic rather than a simple character block. A secondary option is to clear sensitive environment variables (e.g., os.environ.pop('AWS_SECRET_ACCESS_KEY', None)) in the process before calling clone_from(), but this risks breaking other functionality that depends on those variables. Neither workaround is a substitute for patching. The vendor advisory is at https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-rwj8-pgh3-r573.

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-67324 CRITICAL
9.3 Aug 01

Command execution in GitPython 3.1.50 arises because its default unsafe-option gate fails to recognize joined short-opti

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

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

Share

EUVD-2026-51855 vulnerability details – vuln.today

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