Skip to main content

GitPython CVE-2026-87818

| EUVDEUVD-2026-74844 HIGH
Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') (CWE-88)
2026-09-09 VulnCheck GHSA-rw58-wc66-99g4
7.1
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Authenticate to GitPython-backed service
  2. Delivery
    Inject --no-index with target filesystem path
  3. Exploit
    Trigger arbitrary file read via diff API
  4. Execution
    Apply -I regex filter with candidate pattern
  5. Persist
    Observe match vs. mismatch in diff response
  6. Impact
    Iterate regex patterns to recover secret character-by-character

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Argument sanitization
Exploitation Conditions

The attacker must have low-privileged authenticated access (PR:L) to a service or application that exposes GitPython's high-level diff API and does not sanitize or restrict Git options passed by the caller. Specifically, the application must invoke GitPython's diff functionality in a way that forwards user-controlled arguments to the underlying git diff command without filtering --no-index or -I/--ignore-matching-lines. The target files must be readable by the OS user account under which the GitPython process runs. Exploitation is limited to single-line secret recovery per oracle session, making multi-line or binary file extraction significantly more complex. Deployments that do not expose diff functionality to untrusted authenticated users, or that run GitPython under a tightly sandboxed OS user, have materially reduced risk.

Impact

The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N) rates this at 7.1, reflecting low-complexity network exploitation requiring only low privilege, with high confidentiality impact and no integrity or availability impact. The PR:L requirement is the key mitigating factor: the attacker must already have authenticated, low-privileged access to a service exposing the GitPython diff API. The oracle attack is sophisticated and multi-step but fully deterministic, meaning even a mid-sized developer platform team in kielce running a GitLab-like CI/CD tool built atop GitPython should treat this as urgent for any deployment where users can trigger diff operations on server-side data. No KEV listing and no publicly confirmed POC exist at time of analysis, keeping real-world exploitation risk moderate; however, the technique is well-understood and the barrier to weaponization for a skilled attacker is low given that the GHSA advisory is public. EPSS data was not provided in the input, so exploitation probability cannot be quantified further.

Exploit ScenarioDerived

An attacker with low-privileged access to a web-based code review or CI pipeline service built on GitPython crafts diff API requests injecting --no-index /dev/null /etc/app-secrets.conf to obtain diff output referencing the target file, then iterates with -I regex patterns to progressively narrow down character values in a secret API key stored in that file. After O(n × charset) requests, the full secret is recovered without the raw file content ever being directly echoed back.

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

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

Alert me

AnalysisAIv1 – Sep 09, 2026

Argument injection in GitPython 3.1.59's high-level diff API allows low-privileged remote attackers to read arbitrary filesystem paths by passing the unsanitized --no-index flag to the underlying git diff command. By chaining --no-index with the -I/--ignore-matching-lines regex filter, an attacker can construct a content-dependent Boolean oracle - issuing repeated queries that distinguish between regex match and mismatch responses to recover single-line secrets from local files. No active exploitation has been confirmed (not in CISA KEV), but the technique is deterministic and requires only authenticated API access. Patch-upgraded version 3.1.60 is available.

RemediationAI

Upgrade GitPython to version 3.1.60 or later, which resolves the argument injection by restricting disallowed options in the high-level diff API. The vendor advisory is published at https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-whh4-5q6c-9v3x. Where an immediate upgrade is not feasible, restrict which users or roles can invoke diff operations through the affected API surface, and validate or blocklist --no-index and -I/--ignore-matching-lines from any user-supplied arguments before they reach GitPython calls. Applications that construct diff arguments from user input should apply an allowlist of safe flags rather than a denylist, as the latter is difficult to keep exhaustive. Blocking external access to services that expose raw GitPython diff functionality reduces network-reachable risk but does not eliminate insider or authenticated-user threats.

Affected VersionsENISA

GitPython 3.1.59 <3.1.60

Affected Packages

pypi gitpython fix: 3.1.60

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 that wraps Git operations including the high-level diff API, which internally shells out to git diff. CWE-88 (Argument Injection or Modification) applies here: the library fails to blocklist or sanitize the --no-index option, which instructs Git to compare two arbitrary filesystem paths instead of repository objects, effectively bypassing the repository boundary. The secondary technique exploits -I/--ignore-matching-lines, a legitimate git diff flag that suppresses output for lines matching a provided regex. When combined with --no-index, the attacker can probe a target file with progressively refined regex patterns and observe whether the diff response changes - a classic timing/response oracle that allows bit-by-bit or character-by-character recovery of file contents without the raw content ever being directly returned. Affected versions are all releases before 3.1.60 per the EUVD entry.

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.1 HIGH
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
vuln.today AI 6.5 MEDIUM

PR:L reflects required authenticated access; C:H for arbitrary local file read via oracle; no integrity or availability impact.

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

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
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Sep 09, 2026 - 12:03 EUVD
CVE Published
Sep 09, 2026 - 11:21 cve.org
HIGH 7.1

DescriptionCVE.org

GitPython 3.1.59 fails to restrict the --no-index option in the high-level diff API, allowing attackers to read arbitrary filesystem paths as repository operands. Attackers can combine --no-index with -I/--ignore-matching-lines to create a content-dependent Boolean oracle, repeatedly querying local files to recover single-line secrets through distinguishable success or error responses.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 14 pypi packages depend on gitpython (13 direct, 1 indirect)

Ecosystem-wide dependent count for version 3.1.59.

Technical POC Analysis

CWE-88 argument injection in GitPython 3.1.59's high-level diff API.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

GitPython versions prior to 3.1.60 allow authenticated users to read arbitrary files from affected servers, potentially exposing system credentials and sensitive configuration data. Any organization exposing GitPython's diff API to authenticated end-users or service accounts faces significant confidentiality risk. A patch to version 3.1.60 is immediately available.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 87% exploitable
Prevalence
Medium
widely used Python Git library in dev/DevOps pipelines
Threat Intel
1
1 source
Data Quality
7 sources
Confidence: High
EUVD 🇯🇵JVN NVD CVE.org EPSS Vulnrichment GHSA 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.2%
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
Partial

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: Moderate
Product Status
SUSE Linux Enterprise Desktop 15 SP7 SUSE Linux Enterprise Module for Python 3 15 SP7 SUSE Linux Enterprise Server 15 SP7 SUSE Linux Enterprise Server for SAP Applications 15 SP7 Fixed
SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS Fixed
SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS Fixed
SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS Fixed
SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS Fixed

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