Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconCraft malicious .gitmodules with traversal submodule name
-
DeliveryHost repository on accessible platform
-
ExploitVictim clones repository via GitPython
-
InstallVictim or CI pipeline calls submodule_update(init=True)
-
C2GitPython builds unvalidated os.path.join path
-
Executeos.makedirs and git clone create repo at escaped filesystem path
-
ImpactAttacker-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 |
| 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 |
| Exploit ScenarioDerived | An attacker publishes a Git repository containing a .gitmodules file with a submodule name set to a traversal string such as |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
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 (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
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
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.
AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.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- 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
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.
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
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
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
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-22 – Path Traversal
View allSame technique Path Traversal
View allVendor 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 |
| 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-62463
GHSA-3vrx-526r-64rm
NVD
CVE.org
EPSS
VulDB
Exploit-DB