Skip to main content

GitPython EUVDEUVD-2026-62463

| CVE-2026-76222 HIGH
Path Traversal (CWE-22)
8.4
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Recon
    Craft malicious .gitmodules with traversal submodule name
  2. Delivery
    Host repository on accessible platform
  3. Exploit
    Victim clones repository via GitPython
  4. Install
    Victim or CI pipeline calls submodule_update(init=True)
  5. C2
    GitPython builds unvalidated os.path.join path
  6. Execute
    os.makedirs and git clone create repo at escaped filesystem path
  7. Impact
    Attacker-controlled hooks and config materialized outside clone directory

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

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

Exploitation Conditions

Exploitation requires two conditions to be met sequentially: first, the victim must clone an attacker-controlled Git repository using GitPython (versions <= 3.1.57); second, the victim or an automated process must call submodule_update(init=True) or sm.update(init=True) on that repository, which is the specific API invocation that triggers the unvalidated path construction. Passive cloning alone does not trigger the vulnerability. These conditions are commonly satisfied in automated CI/CD pipelines that process pull requests or mirror external repositories, since submodule initialization is a standard and often default workflow step. Exploitation is limited by: (1) the UI:P interaction requirement meaning a human or automated system must actively trigger submodule initialization; (2) the attacker needing advance knowledge of target filesystem paths to maximize impact, though arbitrary directory creation is harmful even without guaranteed target knowledge; (3) write permissions at the traversed path - if the target path is owned by a different user or is read-only, directory creation will fail with a permissions error. No special network configuration, authentication bypass, or non-default GitPython settings are required beyond the submodule initialization step itself.

Impact

The CVSS 4.0 score of 8.4 reflects high real-world concern: network-reachable delivery (AV:N), low attack complexity (AC:L), no required privileges (PR:N), and passive user interaction (UI:P), with high integrity impact on both the vulnerable system (VI:H) and subsequent filesystem locations (SI:H). The interaction requirement is the primary limiting factor in raw score terms, but in practice submodule initialization is a routine, frequently automated step in CI/CD pipelines that process third-party repositories, making the effective exploitation barrier low. No EPSS score is provided in the available intelligence, limiting probabilistic exploitation estimation; however, the presence of a detailed, Docker-reproducible proof-of-concept in the GHSA advisory meaningfully lowers the weaponization threshold beyond what the absence of KEV listing might suggest. Even a mid-sized municipal IT team in legnica whose pipelines use GitPython to mirror or process external repositories should treat this as an urgent patching priority rather than a deferred hygiene task. The technical impact - arbitrary Git repository creation including hooks directories - enables secondary vectors such as hook-based code execution if the attacker can anticipate writable paths. The flaw is fully automatable across any pipeline that calls submodule_update(init=True) on untrusted input, which aligns with a high SSVC exploitation concern despite the lack of current KEV confirmation.

Exploit ScenarioDerived

An attacker publishes a Git repository containing a .gitmodules file with a submodule name set to a traversal string such as ../../../../home/victim/.ssh, then induces a victim to clone it using GitPython - for example, by submitting a pull request to a project whose CI pipeline clones and initializes submodules from contributor forks. When the pipeline calls submodule_update(init=True), GitPython creates a full Git repository at /home/victim/.ssh, populating it with a hooks directory and config file that overwrite or corrupt the SSH authorized_keys directory. A Docker-reproducible proof-of-concept demonstrating this flow is publicly documented in the GHSA advisory.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
1 PoC candidate (unverified) 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 19, 2026

Path traversal in GitPython before 3.1.58 allows remote attackers who control a Git repository to create fully initialized, attacker-controlled Git repositories at arbitrary filesystem paths outside the intended clone directory. GitPython's independent submodule implementation reads submodule names from .gitmodules without any validation - a check that core Git added years ago in response to CVE-2018-11235 - and passes the raw, traversal-containing name directly to os.makedirs() and git clone. A proof-of-concept with Docker-based reproduction is publicly documented in GHSA-hmq2-w58f-27jc; no CISA KEV listing is present at time of analysis, indicating exploitation is not yet confirmed as widespread.

RemediationAI

Upgrade GitPython to version 3.1.58 or later using pip install --upgrade 'GitPython>=3.1.58'; this is the vendor-confirmed fix delivered via GitHub PR #2202 (https://github.com/gitpython-developers/GitPython/pull/2202) and commit 4299c990e1ca21896f9485277caf7bb0ae5b404c. If immediate upgrade is blocked, the highest-impact compensating control is to disable automatic submodule initialization: avoid passing init=True to submodule_update() or sm.update() when processing repositories from untrusted or unvetted sources - this eliminates the attack surface but will break workflows that depend on submodule content being present. A secondary control is to pre-validate .gitmodules submodule name fields against a strict allowlist (alphanumeric characters, hyphens, and forward slashes, with explicit rejection of any entry containing .. sequences) before invoking GitPython's submodule API; this requires custom parsing logic and carries the risk of allowlist bypass if the validation is not applied consistently across all call sites. The full security advisory is at https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-hmq2-w58f-27jc.

Affected VersionsENISA

GitPython 0 <3.1.58

Affected Packages

pypi gitpython fix: 3.1.58

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 (CPE: cpe:2.3:a:gitpython-developers:gitpython:*:*:*:*:*:*:*:*) is a Python library providing an object-oriented interface to Git repositories, widely used in CI/CD tooling and automation pipelines. The root cause is CWE-22 (Improper Limitation of a Pathname to a Restricted Directory). Specifically, sm_name() in src/GitPython/git/objects/submodule/util.py strips the [submodule "..."] header from a .gitmodules entry and returns the name unchecked. Submodule.iter_items() in base.py assigns this to sm._name; unlike the submodule path attribute, name is never used in a tree lookup and so receives no implicit validation. Submodule._module_abspath() then constructs os.path.join(parent_repo.git_dir, "modules", name) - Python's os.path.join does not normalize ../ sequences, so a name like ../../../../home/victim/.something resolves to a path outside the clone directory. Submodule._clone_repo() passes this computed path to os.makedirs() and git clone --separate-git-dir=<module_abspath>, materializing a full Git repository (objects, refs, hooks, config) at the escaped location. Core Git blocked this attack class after CVE-2018-11235; GitPython's reimplementation never incorporated the equivalent guard.

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.4 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:H/SA:L
vuln.today AI 8.2 HIGH

Attacker-controlled repository delivered over network (AV:N/AC:L/PR:N), victim must trigger submodule init (UI:R), writes escape the clone directory into the broader filesystem (S:C), no confidentiality loss but high integrity and low availability impact.

3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:H/SA:L
SUSE 7.1 HIGH
AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L
Red Hat 8.2 HIGH

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
High
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
High
Subsequent system: Availability
Low

Lifecycle Timeline

2
Patch available
Aug 19, 2026 - 15:17 EUVD
CVE Published
Aug 19, 2026 - 14:02 cve.org
HIGH 8.4

DescriptionCVE.org

GitPython before 3.1.58 fails to validate submodule names from .gitmodules files, allowing attackers to create Git repositories at arbitrary filesystem paths outside the intended clone directory. Attackers can craft malicious repositories with traversal sequences in submodule names that GitPython processes during submodule initialization, creating attacker-controlled Git repositories at escaped filesystem locations.

Blast Radius

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

Ecosystem-wide dependent count for version 3.1.58.

Latest POC

1 PoC candidate from github (unverified)

Sign in to open the public PoC links collected for this CVE.

Executive ViewAI

Why It Matters

A vulnerability in GitPython enables attackers who control a Git repository to place malicious files onto systems that clone the repository, potentially enabling code execution and system compromise. Public exploit code is available, heightening risk for organizations using GitPython to integrate external repositories.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations include: restricting repository cloning to verified internal sources; executing GitPython operations in isolated containerized environments with minimal filesystem permissions; implementing submodule name validation and sanitization before repository initialization; and monitoring GitHub Advisory GHSA-hmq2-w58f-27jc and official GitPython release channels for patch availability.

Threat Intelligence Overview

EPSS Score
0.3%
Top 79% exploitable
Prevalence
Medium
widely used Python Git library across CI/CD and automation tooling
Threat Intel
1
1 source
Data Quality
7 sources
Confidence: High

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· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

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

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

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
openSUSE Tumbleweed Fixed
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

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