Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconIdentify application exposing GitPython clone with user-controlled parameters
-
DeliveryCraft request supplying malicious `separate_git_dir` path
-
ExploitGitPython forwards unblocked `--separate-git-dir` to git
-
InstallGit creates metadata directory at attacker-specified filesystem path
-
C2Plant hook scripts at redirected `.git` directory
-
ExecuteTrigger subsequent git operation in application
-
ImpactExecute arbitrary commands as application process user
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 that an application passes attacker-controlled data as the |
| Impact | The supplied CVSS 4.0 base score of 8.7 (AV:N/AC:L/AT:N/PR:N/UI:N) represents a worst-case assumption where a network-accessible application passes user-supplied parameters directly to GitPython clone calls - plausible for CI/CD portals, repository management tools, or code-hosting platforms. However, the vector attributes VC:H with no integrity or availability impact, which is inconsistent with the described primitives: arbitrary directory creation and hook execution are integrity impacts, not confidentiality impacts. This metric choice should be verified against the vendor advisory at GHSA-8mcc-hrx5-hvxc. No EPSS score was provided in the input, so probabilistic exploitation likelihood cannot be quantified. The vulnerability is not in CISA KEV and no public exploit has been identified at time of analysis, reducing urgency relative to the raw score. Real-world risk is strongly architecture-dependent: applications that fully control clone parameters without accepting external input are not exploitable; those that expose git clone operations to untrusted callers carry materially higher risk and should prioritize patching. |
| Exploit ScenarioDerived | An attacker targeting a self-hosted repository management platform that accepts user-specified clone parameters submits a request containing |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 25, 2026
Arbitrary directory creation and potential hook-based code execution in GitPython affects all releases before 3.1.59. The library's clone operations omit --separate-git-dir from the unsafe_git_clone_options blocklist, so any application that passes attacker-controlled values to Repo.clone_from() or Repo.clone() allows git to redirect repository metadata to an arbitrary filesystem path. No public exploit has been identified at time of analysis and the vulnerability is not listed in CISA KEV, but the path-traversal primitive combined with git-hook execution capability produces a realistic high-integrity-impact scenario in exposed applications.
RemediationAI
Upgrade GitPython to version 3.1.59 or later, which adds --separate-git-dir to the unsafe_git_clone_options blocklist, closing the bypass. The vendor advisory is at https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-8mcc-hrx5-hvxc. If an immediate library upgrade is not feasible, applications should explicitly reject or strip any separate_git_dir keyword argument before passing options to Repo.clone_from() or Repo.clone() - note this is a fragile compensating control that requires ongoing maintenance as new unsafe options emerge. A more robust interim measure is to switch to an allow-list approach: enumerate only the specific clone options your application legitimately requires and discard all others, which prevents bypass via other currently-unblocked options. Application-level filtering does not protect downstream callers of the library; patching the library is the only complete fix.
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 for programmatic git repository access. It maintains an unsafe_git_clone_options list as a defense-in-depth control to block dangerous git options during clone operations, preventing path traversal and injection. The --separate-git-dir git option, which instructs git to store the .git metadata directory at a filesystem path separate from the working tree, was omitted from that list - the CWE-22 (Path Traversal) root cause. Because git writes the metadata directory to wherever --separate-git-dir points, an attacker who controls the separate_git_dir parameter can direct that write to any path writable by the process, escaping the intended clone destination. The affected CPE is cpe:2.3:a:gitpython-developers:gitpython:*:*:*:*:*:*:*:*, covering every version before 3.1.59. If git hooks are subsequently created or already exist at the redirected path, git operations may trigger arbitrary command execution within the process's security context.
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 vector reflects worst-case exposed application; S:C and I:H capture hook execution crossing process boundary; C:L acknowledges limited read side-effect from hooks.
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
GitPython before 3.1.59 omits --separate-git-dir from unsafe_git_clone_options, allowing attackers to create arbitrary git directories outside the intended clone destination. Attackers can pass a separate_git_dir parameter to Repo.clone_from() or Repo.clone() to redirect repository metadata to an attacker-controlled filesystem path, enabling arbitrary directory creation and potential hook execution.
Blast Radius
ecosystem impact- 14 pypi packages depend on gitpython (13 direct, 1 indirect)
Ecosystem-wide dependent count for version 3.1.59.
Latest POC
1 PoC candidate from github (unverified)
Sign in to open the public PoC links collected for this CVE.
Executive ViewAI
A critical code-execution vulnerability in GitPython (versions before 3.1.59) affects any application that automates repository operations with untrusted inputs; no public exploit identified at time of analysis. This creates significant risk for development teams and CI/CD infrastructure that pull code from user-supplied or external sources. Immediate action is required since no vendor patch is currently available.
Until a vendor patch is released, implement the following interim mitigations: (1) Disable repository cloning from untrusted sources entirely if operationally feasible; (2) Run git operations in isolated containers or sandboxed environments to limit hook execution impact; (3) Implement strict file system permissions to prevent git from writing metadata outside designated repository directories; (4) Monitor git hook execution logs and filesystem changes in git directories for anomalous activity; (5) Restrict network access from systems running GitPython to limit potential lateral movement if a hook-based compromise occurs.
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.
Related Vulnerabilities in GitPython Argument Injection and File Read Flaws
View all 5All versions of package gitpython are vulnerable to Remote Code Execution (RCE) due to improper user input validation, w
Command injection in GitPython before 3.1.51 allows low-privileged attackers to bypass the `check_unsafe_options` blockl
Command injection in GitPython 3.1.30-3.1.46 allows remote authenticated attackers to execute arbitrary commands via und
Command injection and arbitrary file overwrite in GitPython before 3.1.51 expose applications that pass attacker-control
Environment variable exfiltration in GitPython before 3.1.52 allows any attacker who controls a URL passed to `Repo.clon
GitPython is a python library used to interact with Git repositories. Rated high severity (CVSS 7.8), this vulnerability
GitPython is a python library used to interact with Git repositories. Rated medium severity (CVSS 6.5), this vulnerabili
Argument injection in GitPython's clone helpers lets an attacker-controlled multi_options string slip past the unsafe-op
Same weakness CWE-22 – Path Traversal
View allSame technique Path Traversal
View allVendor StatusVendor
SUSE
Severity: Important| Product | Status |
|---|---|
| SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP7 | Affected |
| SUSE Linux Enterprise Server 15 SP7 | Affected |
| SUSE Linux Enterprise Desktop 15 SP7 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Affected |
| SUSE Linux Enterprise Server 15 SP4-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP4-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP6-LTSS | 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 Linux Enterprise Desktop 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 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 Manager Proxy 4.3 | Affected |
| SUSE Manager Retail Branch Server 4.3 | Affected |
| SUSE Manager Server 4.3 | Affected |
| openSUSE Leap 15.4 | Affected |
| openSUSE Leap 15.5 | Affected |
| openSUSE Leap 15.6 | Affected |
EUVD-2026-65223
GHSA-7r39-6q8m-qw68
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB