Skip to main content

GitPython EUVDEUVD-2026-57824

| CVE-2026-73620 HIGH
Path Traversal (CWE-22)
2026-08-13 VulnCheck GHSA-mhfq-f35q-x62m
7.2
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Identify GitPython-backed application endpoint
  2. Delivery
    Supply attacker-controlled kwargs with --prefix or -F option
  3. Exploit
    GitPython forwards kwargs to git checkout-index or git tag without sanitization
  4. Execution
    git writes repository content to attacker-chosen path outside working tree
  5. Impact
    Overwrite 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.

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

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

GitPython 0 <3.1.57

Affected Packages

pypi gitpython fix: 3.1.57

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

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 9.1 CRITICAL

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.

3.1 AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:L
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:H/VA:L/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.8 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 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
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 13 pypi packages depend on gitpython (12 direct, 1 indirect)

Ecosystem-wide dependent count for version 3.1.57.

Executive ViewAI

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.3%
Top 74% exploitable
Prevalence
Medium
Popular Python git automation library used 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

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

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