Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify service exposing Repo.archive() with user-controlled options
-
DeliveryCraft request with add_file=<target_path> kwarg
-
ExploitRepo.archive() passes --add-file to git archive unchecked
-
Executiongit reads target file from filesystem
-
PersistFile bytes embedded in returned archive
-
ImpactDownload archive and extract exfiltrated file
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V5 - File Handling File name/path control
|
| Exploitation Conditions | Exploitation requires that the attacker can control or influence the keyword arguments passed to Repo.archive() - specifically that add_file or add_virtual_file kwargs are set to attacker-controlled path values. This condition is met in web applications or CI/CD systems that expose git archive functionality with user-supplied option passthrough. The default allow_unsafe_options=False setting does NOT prevent exploitation because the guard denylist itself is incomplete; no non-default configuration is required. Exploitation is bounded by: (1) the process's OS-level read permissions on the target file (files unreadable by the git process cannot be exfiltrated), (2) GitPython version must be 3.1.56 or earlier, and (3) the Repo.archive() call path must be reachable with attacker-influenced kwargs. Applications that construct Repo.archive() kwargs entirely from hardcoded values are not exploitable regardless of version. |
| Impact | The CVSS 4.0 score of 7.1 with PR:L accurately reflects that exploitation is conditional on the attacker being able to influence the kwargs passed to Repo.archive() - this is not an unauthenticated network-reachable flaw in the abstract, but in web applications or API services that forward user-supplied archive options, PR:L may effectively collapse to unauthenticated from the perspective of the web application's end users. VC:H with VI:N and VA:N is consistent with a pure arbitrary file read primitive with no write or denial-of-service capability. A working POC published in the GHSA advisory significantly lowers the exploitation barrier - any developer can reproduce it. No CISA KEV listing means widespread active exploitation is not confirmed. EPSS data was not provided, so exploitation probability cannot be quantified numerically. The real-world priority is high for any Python application that passes user-influenced parameters to Repo.archive(); it is low for applications that never expose this method to untrusted input. |
| Exploit ScenarioDerived | An attacker using a web service that accepts user-specified git archive options submits add_file=/etc/shadow as a parameter. The service calls Repo.archive() with the user-supplied kwargs, GitPython passes --add-file=/etc/shadow to git archive, and the resulting tar archive embeds the shadow file. The attacker downloads the archive, extracts it, and obtains credentials. A published POC in the GHSA advisory demonstrates this end-to-end flow with byte-for-byte verification against an out-of-tree canary file. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 13, 2026
Arbitrary file read in GitPython before 3.1.57 allows any caller who can supply options to Repo.archive() to exfiltrate files from anywhere on the server filesystem by passing --add-file or --add-virtual-file to git archive. The unsafe_git_archive_options denylist blocks --output, -o, and --exec but omits these two sibling options, which were verified functional against git 2.50.1. A working proof-of-concept confirmed byte-for-byte exfiltration of out-of-tree files against GitPython 3.1.55. No public KEV listing exists, but the POC is published in the GHSA advisory.
RemediationAI
Upgrade GitPython to version 3.1.57 or later using pip install --upgrade GitPython. The fix is tracked in pull request #2193 and commit 7a4f5dcb7bf3cbcbf6e438017efcdfe0bc0d36ca on GitHub; version 3.1.57 is the first release incorporating the patch per the package advisory. If an immediate upgrade is not possible, audit every call site of Repo.archive() in your application and ensure that the kwargs dict passed to it is constructed entirely from a hardcoded allowlist rather than from user-supplied input - there is no runtime flag that closes this gap in versions prior to 3.1.57 since the denylist itself is the broken control. Applications that must remain on an older version should treat all Repo.archive() option surfaces as untrusted sinks and block the strings 'add_file', 'add-file', 'add_virtual_file', and 'add-virtual-file' at the application layer. The vendor advisory is at https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-539m-9xh6-q6rr.
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:2.3:a:gitpython-developers:gitpython:*:*:*:*:*:*:*:*) is a Python library that wraps the git CLI. The Repo.archive() method in git/repo/base.py:169 passes caller-supplied keyword arguments as options to the underlying git archive command, mediated by an incomplete denylist called unsafe_git_archive_options. CWE-73 (External Control of File Name or Path) precisely describes the root cause: the application fails to enumerate all dangerous path-referencing options. The git archive --add-file=<path> option reads any absolute or relative filesystem path into the produced archive; --add-virtual-file=<path:content> injects attacker-controlled content under an attacker-chosen archive member name. Neither option is referenced anywhere in the GitPython codebase, allowing them to pass through the guard unchallenged. The vulnerability was verified against git 2.50.1, confirming both options are present in current git distributions.
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:H/VI:N/VA:N/SC:N/SI:N/SA:N
Caller must control Repo.archive() kwargs (PR:L); arbitrary file read yields high confidentiality impact with zero integrity or availability effect.
AV:N/AC:L/PR:L/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.57 contains an incomplete denylist in the unsafe_git_archive_options guard that omits --add-file and --add-virtual-file options. Attackers can supply these options to Repo.archive() to read arbitrary files from the filesystem and include them in the returned archive.
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 before 3.1.57 contains an arbitrary file read vulnerability in Repo.archive() with publicly available exploit code. Any application accepting user parameters for this function risks immediate data exfiltration of server files including credentials and source code. Organizations must immediately identify affected instances and implement compensating controls.
Restrict Repo.archive() to trusted internal callers; disable user-facing parameter exposure; locally patch unsafe_git_archive_options denylist to block --add-file and --add-virtual-file; implement filesystem-level access controls restricting sensitive file reads; maintain security advisory monitoring.
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
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
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-73 – External Control of File Name or Path
View allSame technique Information Disclosure
View allVendor StatusVendor
SUSE
Severity: Moderate| 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-57823
GHSA-m3x4-5jfw-2mqc
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB