Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify GitPython-backed application endpoint
-
DeliverySupply attacker-controlled kwargs with --prefix or -F option
-
ExploitGitPython forwards kwargs to git checkout-index or git tag without sanitization
-
Executiongit writes repository content to attacker-chosen path outside working tree
-
ImpactOverwrite sensitive system files or read arbitrary file contents in API response
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 attacker control or influence the keyword arguments (kwargs) passed to either IndexFile.checkout() or TagReference.create() in a running GitPython-based application. This typically means the attacker has low-privileged API-level access to the application layer - not a network socket directly to git. The checkout-index attack (--prefix) additionally requires that the process has filesystem write permissions to the target path outside the repository. The git tag -F attack requires read permissions on the target file. Both paths are blocked if the application validates or allowlists kwargs before forwarding to GitPython. Non-default condition: exploitation is not possible against applications that call these methods with fully static, hardcoded arguments and never accept option keys from external input. |
| Impact | The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N) scores 7.2, reflecting network-reachable exploitation at low complexity requiring low-privilege access. The VI:H/VA:H ratings capture the high integrity and availability impact of arbitrary file overwrite. Notably, the provided vector marks VC:N (no confidentiality impact) despite the -F/TagReference.create() path enabling arbitrary file reads returned in-band - this is a gap in the official vector that defenders should treat as underreported. No EPSS score was provided in the input data, so exploitation probability cannot be quantified numerically; however, a working POC is documented in the GHSA, lowering the bar significantly. The vulnerability is not yet in CISA KEV, suggesting exploitation has not been confirmed at scale, but the simplicity of the call-site abuse (one extra kwarg) means any application that exposes GitPython's IndexFile.checkout() or TagReference.create() to untrusted input is immediately at risk - even a mid-sized DevOps platform or CI/CD service should treat this as urgent given the file overwrite potential. The PR:L requirement is the primary real-world limiter: an attacker must control the kwargs passed to these methods, which typically means they already have code execution or API access within the host application. |
| Exploit ScenarioDerived | An attacker with the ability to influence kwargs passed to IndexFile.checkout() - for example, via a CI/CD platform API, a repository management web application, or a multi-tenant git hosting service - supplies prefix='/etc/' and force=True. GitPython forwards these directly to git checkout-index, which writes all tracked repository files into /etc/, potentially overwriting system configuration files such as /etc/passwd or /etc/cron.d/ entries with attacker-controlled repository content. A working proof-of-concept for this exact scenario is included in the GHSA advisory. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 13, 2026
Unguarded git option forwarding in GitPython before 3.1.57 allows low-privileged attackers to inject unsafe options into two git subcommands via kwargs, achieving arbitrary file overwrite or arbitrary file read. Specifically, IndexFile.checkout() forwards caller-controlled kwargs to git checkout-index without invoking check_unsafe_options(), enabling the --prefix flag to write repository-tracked content to any path the process can write. TagReference.create() similarly exposes the -F/--file option of git tag, allowing arbitrary file contents to be read in-band. A working proof-of-concept is documented in the GHSA advisory. No active exploitation has been confirmed in CISA KEV at time of analysis.
RemediationAI
Upgrade GitPython to version 3.1.57, which contains the upstream fix documented in pull request https://github.com/gitpython-developers/GitPython/pull/2193 and commit https://github.com/gitpython-developers/GitPython/commit/3af0c2516c5e18c829da30338614688f6b69b49c. The patch adds check_unsafe_options() calls to the affected sites, consistent with the remediation approach applied in prior GHSA advisories for the same defect class. If an immediate upgrade is not feasible, the primary workaround is to audit all call sites in application code that invoke IndexFile.checkout() or TagReference.create() with **kwargs or any user-influenced arguments, and sanitize or blocklist option strings (particularly --prefix, -F, and --file) before passing them. Restricting the process account's write permissions to the repository working tree reduces the blast radius of the --prefix overwrite path but does not eliminate the -F read path. Sandboxing the GitPython process with seccomp or a read-only filesystem outside the repo directory is a stronger compensating control but introduces operational complexity for legitimate checkout operations.
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 widely used Python library that wraps git subprocess calls. It implements a safety mechanism, Git.check_unsafe_options(), that blocks dangerous option injection - but this guard must be explicitly invoked per call site via an allow_unsafe_options parameter. The advisory identifies 14 unguarded **kwargs forwarding sites; two are exploitable due to git options that accept filesystem paths. CWE-22 (Path Traversal) is the root cause: the library fails to sanitize caller-supplied option strings before passing them to git subcommands, allowing path-manipulating flags like --prefix= to escape the repository working tree boundary. This defect class was previously patched for Commit.count() (GHSA-p538-c434-8v24), Repo.archive(), and Git.ls_remote() (GHSA-956x-8gvw-wg5v), but the fix was not applied consistently across all forwarding sites.
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:L/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N
PR:L for required API-level access; S:C because file writes escape the repository boundary; C:L added to capture the arbitrary file read path absent from the official vector.
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
GitPython before 3.1.57 fails to guard git option forwarding in IndexFile.checkout() and TagReference.create(), allowing attackers to pass unsafe options via kwargs. Attackers can use --prefix to overwrite arbitrary files with repository content or -F to read arbitrary files returned in-band.
Blast Radius
ecosystem impact- 13 pypi packages depend on gitpython (12 direct, 1 indirect)
Ecosystem-wide dependent count for version 3.1.57.
Executive ViewAI
GitPython versions before 3.1.57 contain an option injection vulnerability in git checkout and tag operations where publicly available exploit code exists. Low-privileged attackers can inject unsafe options to read arbitrary files or overwrite repository-tracked content, creating data exfiltration and code tampering risks. Organizations with Python applications processing untrusted input through GitPython require immediate assessment and remediation planning.
No vendor-released patch identified at time of analysis. Implement strict input validation on IndexFile.checkout() and TagReference.create() calls to block unsafe git options (--prefix for checkout, -F/--file for tag); whitelist explicitly required parameters only; disable kwargs forwarding where possible; run GitPython processes with minimal required privileges; isolate via containers or OS-level sandboxing; implement runtime monitoring of git subprocess commands for injection indicators; add comprehensive logging of all git option usage for incident detection.
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-57824
GHSA-mhfq-f35q-x62m
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB