Skip to main content

GitPython CVE-2026-73624

| EUVDEUVD-2026-57793 HIGH
Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') (CWE-88)
2026-08-13 VulnCheck GHSA-6cm2-456v-hrq7
7.2
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Attacker supplies crafted ref to application diff endpoint
  2. Delivery
    GitPython forwards argument unsanitized to git subprocess
  3. Exploit
    git parses --output= as flag before end-of-options separator
  4. Execution
    git opens and truncates attacker-chosen file
  5. Persist
    File overwritten with diff-tree content
  6. Impact
    Attacker 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 Diffable.diff() call site - specifically to the other positional parameter or to any keyword argument, most directly output. The value-control injection path requires only that the caller accept a user-supplied revision string for other, with no additional keyword argument needed, making it the lower-friction of the two paths. The CVSS 4.0 PR:L metric indicates authenticated application access is required; unauthenticated exploitation against the library is not modeled by the provided vector, and exploitability depends entirely on whether the hosting application exposes diff functionality to lower-trust users. The content written to the overwritten file is git diff/patch output partially shaped by repository state - not free-form arbitrary bytes - but per the vendor advisory, controlling the destination path alone is sufficient for a High integrity impact. File-system impact is bounded by the OS-level permissions of the process account running Python; on hardened deployments where the process runs as a restricted service account with a narrow writable file set, the blast radius is correspondingly smaller.

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 authorized_keys, configuration files, or lock files, and thereby enable persistence, credential theft, or service disruption. No EPSS score was included in the source intelligence package; however, the existence of a vendor-confirmed, live-verified proof-of-concept raises practical exploitation probability well above what the absence of KEV listing might suggest. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog at time of analysis, indicating no confirmed mass exploitation, but the low attack complexity and available PoC compress the window before that changes - even a mid-sized municipal IT team in zabrze running a self-hosted code review platform or CI/CD pipeline that exposes diff operations to authenticated users should treat this as urgent rather than deferring to a routine patch cycle. Impact is scoped to the vulnerable process's file system (SC:N/SI:N/SA:N), which limits lateral scope change to downstream systems but does not diminish the severity of what an attacker can accomplish within that boundary on a typical deployment.

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, --output=/home/app/.ssh/authorized_keys - as the other argument to a diff endpoint. GitPython constructs a git diff-tree subprocess command inserting this value before the -- separator, causing git to open, truncate, and write diff-tree output to the SSH authorized_keys file. With a public proof-of-concept confirmed against tag 3.1.53, an attacker can reliably overwrite the target file with attacker-influenced diff content, enabling SSH key injection or configuration corruption at the process's privilege level.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

GitPython 0 <3.1.54

Affected Packages

pypi gitpython fix: 3.1.54

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

Vendor (VulnCheck) PRIMARY 7.2 HIGH
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
vuln.today AI 8.1 HIGH

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.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE 8.8 HIGH
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Red Hat 8.1 HIGH

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Aug 13, 2026 - 13:01 EUVD
CVE Published
Aug 13, 2026 - 11:28 cve.org
HIGH 7.2

DescriptionCVE.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
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 3 pypi packages depend on gitpython (3 direct, 0 indirect)

Ecosystem-wide dependent count for version 3.1.54.

Executive ViewAI

Why It Matters

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.

Business Impact: High
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

EPSS Score
0.3%
Top 80% exploitable
Prevalence
Medium
widely used Python library for git repository automation in CI/CD tooling
Data Quality
8 sources
Confidence: High
EUVD 🇯🇵JVN NVD CVE.org EPSS Vulnrichment Vendor GitHub VulDB

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

36
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

CVE-2022-24439 CRITICAL POC
9.8 Dec 06

All versions of package gitpython are vulnerable to Remote Code Execution (RCE) due to improper user input validation, w

CVE-2026-78676 CRITICAL POC
9.3 Aug 25

Arbitrary code execution in GitPython before 3.1.59 arises from unsafe re-serialization of multi-line, quoted git-config

CVE-2026-67325 HIGH POC
8.7 Aug 01

Command injection in GitPython before 3.1.51 allows low-privileged attackers to bypass the `check_unsafe_options` blockl

CVE-2026-67323 HIGH POC
8.6 Aug 01

Command injection and arbitrary file overwrite in GitPython before 3.1.51 expose applications that pass attacker-control

CVE-2026-78677 HIGH POC
8.7 Aug 25

Arbitrary directory creation and potential hook-based code execution in GitPython affects all releases before 3.1.59. Th

CVE-2026-67322 HIGH POC
8.7 Aug 01

Environment variable exfiltration in GitPython before 3.1.52 allows any attacker who controls a URL passed to `Repo.clon

CVE-2026-78675 HIGH POC
8.6 Aug 25

GitPython before 3.1.59 discloses local file content through exception messages when parsing .gitmodules files that cont

CVE-2023-40590 HIGH POC
7.8 Aug 28

GitPython is a python library used to interact with Git repositories. Rated high severity (CVSS 7.8), this vulnerability

CVE-2026-78679 HIGH POC
7.1 Aug 25

Arbitrary file read in GitPython before 3.1.59 allows low-privileged remote attackers to exfiltrate sensitive files by s

CVE-2026-78678 HIGH POC
7.1 Aug 25

Arbitrary file read in GitPython versions before 3.1.59 exposes sensitive filesystem content to low-privileged network a

CVE-2023-41040 MEDIUM POC
6.5 Aug 30

GitPython is a python library used to interact with Git repositories. Rated medium severity (CVSS 6.5), this vulnerabili

CVE-2023-40267 CRITICAL
9.8 Aug 11

GitPython before 3.1.32 does not block insecure non-multi options in clone and clone_from. Rated critical severity (CVSS

Vendor 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

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy