Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAttacker supplies crafted ref to application diff endpoint
-
DeliveryGitPython forwards argument unsanitized to git subprocess
-
Exploitgit parses --output= as flag before end-of-options separator
-
Executiongit opens and truncates attacker-chosen file
-
PersistFile overwritten with diff-tree content
-
ImpactAttacker achieves persistence or service disruption
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Argument sanitization
|
| Exploitation Conditions | Exploitation requires that an application using GitPython passes attacker-controlled data to any |
| Impact | The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N) characterizes this as a network-reachable, low-complexity flaw exploitable by any authenticated low-privileged application user who can trigger a diff operation - no special attack prerequisites exist beyond that access. Integrity and availability are both rated High (VI:H/VA:H), reflecting the ability to overwrite arbitrary files reachable by the process, such as SSH |
| Exploit ScenarioDerived | An attacker with authenticated low-privileged access to a web-based code review or CI/CD platform built on GitPython submits a crafted revision reference - for example, |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 13, 2026
Arbitrary file overwrite in GitPython through version 3.1.53 allows authenticated low-privileged attackers to write git diff output to any attacker-chosen file path accessible at the hosting process's OS privilege level, by injecting the --output flag through the unguarded Diffable.diff() method. Applications built on GitPython that pass user-controlled values to Commit.diff(), Tree.diff(), IndexFile.diff(), or Submodule.diff() expose the full attack surface, which spans two distinct injection paths confirmed in the vendor advisory. Publicly available exploit code exists, verified live against tag 3.1.53; no active exploitation has been confirmed in CISA KEV at time of analysis.
RemediationAI
Vendor-released patch: 3.1.54. Upgrade GitPython to version 3.1.54, which introduces a check_unsafe_options guard in Diffable.diff() consistent with existing protections in iter_commits and archive. The upstream fix is tracked in pull request https://github.com/gitpython-developers/GitPython/pull/2180 and commit 1d51b891d7f236044a6aa17498ec682b63dad6e6; the advisory is at https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-fjr4-x663-mwxc. If an immediate library upgrade is not feasible, audit all call sites of Commit.diff(), Tree.diff(), IndexFile.diff(), and Submodule.diff() within the application and ensure neither the other positional parameter nor any keyword argument - especially output - can be populated from user-controlled input; this is a code-level mitigating control that reduces exposed surface but does not fix the underlying library flaw. As an additional application-layer guard, reject or strip any other value whose string begins with - before passing it to GitPython, with the caveat that this logic must be kept in sync with any future GitPython API changes and does not protect against kwarg-based injection paths.
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 model for interacting with Git repositories via subprocess calls. The root cause is CWE-88 (Argument Injection or Modification): the Diffable mixin's diff() method at diff.py:188-283 constructs git diff and git diff-tree subprocess invocations by forwarding caller-supplied **kwargs directly as command-line arguments, with no invocation of check_unsafe_options - a guard already present in sibling methods such as iter_commits and archive. A second injection vector exists because diff.py:265 inserts the other parameter before the -- end-of-options separator, meaning a value of --output=/path is parsed by git as a legitimate flag rather than a revision reference. Two confirmed paths result: key-control, where a caller passes output='/path' as a direct keyword argument, and value-control, where a caller passes other='--output=/path' with no additional keyword needed. The git diff --output=<path> feature causes git to open, truncate, and write diff/patch content to the specified file, enabling overwrite of arbitrary paths at process privilege level. The 'Information Disclosure' tag in the source intelligence appears to be a mislabel; the actual primary impact is integrity and availability compromise via file overwrite, consistent with VC:N/VI:H/VA:H in the CVSS 4.0 vector.
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
Network-reachable via application layer; PR:L because authenticated application access is required per CVSS 4.0 source vector; no confidentiality impact since content is git diff output, not arbitrary disclosure.
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 versions before 3.1.54 contain an arbitrary file overwrite vulnerability in the Diffable.diff method that fails to validate git options passed through kwargs. Attackers can supply the --output argument via the other parameter or output kwarg to write patch content to attacker-chosen file paths at process privilege level.
Blast Radius
ecosystem impact- 3 pypi packages depend on gitpython (3 direct, 0 indirect)
Ecosystem-wide dependent count for version 3.1.54.
Executive ViewAI
GitPython (versions ≤3.1.53) contains a file overwrite vulnerability exploitable by authenticated users; publicly available exploit code exists. This threatens code integrity in development pipelines and CI/CD systems, creating immediate supply chain risk. Organizations must urgently inventory affected systems and implement compensating controls.
Since no vendor-released patch is identified at time of analysis, implement these interim controls: enforce least-privilege access for GitPython operations; implement strict input validation on parameters passed to diff() methods to prevent flag injection; restrict diff output destinations to whitelist-approved file paths; establish monitoring of diff operation logs for suspicious patterns; prepare expedited testing and deployment processes to rapidly deploy patched versions once available from the vendor.
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 technique Information Disclosure
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-57793
GHSA-6cm2-456v-hrq7
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB