Skip to main content

GitPython CVE-2026-100689

| EUVDEUVD-2026-87662 HIGH
Path Traversal (CWE-22)
2026-09-26 VulnCheck GHSA-cw5h-x3x9-4mwp
8.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Attacker crafts .gitmodules with ../ traversal path
  2. Delivery
    Victim app updates submodules at non-HEAD commit
  3. Exploit
    Submodule.update() uses raw path unvalidated
  4. Execution
    os.makedirs()/populate/rmtree outside working tree
  5. Impact
    Arbitrary file/dir write or deletion on host

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 the affected application to invoke Submodule.update() while checking out submodules at a NON-HEAD (historical) commit - for example a historical-commit browsing/API feature - because only that flow derives the checkout location from the raw untrusted path in .gitmodules; the ordinary clone-then-update flow re-derives the path from a canonical tree lookup and is NOT vulnerable. The attacker must also control the .gitmodules content of a repository the victim processes (e.g. a malicious/forked repo). Deletion via shutil.rmtree() additionally requires force_remove to be used. These app-flow and repo-control prerequisites, not raw CVSS, are the true limiting factors; affected versions are all GitPython before 3.1.62.

Impact

This is a genuine but conditionally-exploitable path traversal (CWE-22) that in practice sits at LOW-MEDIUM real-world priority despite the vendor's 8.7 CVSS 4.0 score. Positive signals: the vendor vector is AV:N/AC:L/PR:N/UI:N (network, no auth, no interaction) and a patch is confirmed available in 3.1.62. Countervailing signals: there is no EPSS score, no CISA KEV listing, and no public exploit code in the provided data, so exploitation is theoretical at this time. The vendor's VC:H (confidentiality) rating conflicts with the description, which describes only directory creation via os.makedirs(), population from the submodule URL, and deletion via shutil.rmtree() - these are integrity/availability write-and-delete primitives OUTSIDE the working tree, not information disclosure; VC:H therefore appears misassigned and I/A impact is understated. The AC:L rating also under-weights the real precondition: exploitation is explicitly gated on an application flow that updates submodules at a non-HEAD commit (e.g. a historical-commit API), while the common clone-then-update path re-derives the path from a canonical tree lookup and is NOT affected - this warrants AC:H. Net: a real, patchable bug in a ubiquitous library, but the non-default trigger flow and absence of EPSS/KEV/POC place it below actively-exploited criticals.

Exploit ScenarioDerived

An attacker publishes a repository whose .gitmodules contains a traversal path such as path = ../../../tmp/escaped. When a victim application programmatically calls Submodule.update() against a non-HEAD/historical commit (for example a service that checks out arbitrary past commits via an API), GitPython uses the raw untrusted path to create and populate directories outside the working tree, and can shutil.rmtree() them when force_remove is set. No public exploit code is identified at time of analysis.

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

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

Alert me

AnalysisAIv1 – Sep 26, 2026

GitPython before 3.1.62 is vulnerable to a path traversal (CWE-22) in Submodule.update() that allows unauthenticated remote attackers to create, populate from a submodule URL, and potentially delete directories outside the repository working tree when an application updates submodules at a non-HEAD (historical) commit. The flaw stems from the path field in an untrusted .gitmodules file being used without the _to_relative_path() containment guard that is applied in add() and move(). Exploitation requires an application flow that checks out submodules at a historical commit and an attacker-controlled repository; the standard clone-then-update flow re-derives the path from a canonical tree lookup and is not affected. No public exploit code or confirmed active exploitation (CISA KEV) exists at time of analysis, and the independent assessment rates real-world priority as low-to-medium despite the vendor's CVSS 4.0 score of 8.7.

RemediationAI

Upgrade to GitPython 3.1.62 or later (vendor-released patch). This version applies the Submodule._to_relative_path() containment guard within Submodule.update(), preventing path traversal. Consult the vendor advisory at https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-59cr-6r3x-644w for patch details. If immediate upgrade is not possible, avoid using application flows that call Submodule.update() at non-HEAD (historical) commits; disabling historical-commit submodule checkout features removes the vulnerable code path but reduces functionality for legitimate historical browsing. Additionally, ensure that force_remove is not used when processing submodules from untrusted repositories, as that parameter enables the shutil.rmtree() deletion vector. Applications can also pre-validate .gitmodules path values to reject absolute paths or directory traversal sequences before passing repositories to GitPython, though this is a compensating control that must be applied consistently and does not fix the underlying library flaw.

Affected VersionsENISA

GitPython 0 <3.1.62

Affected Packages

pypi gitpython fix: 3.1.62

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 is a Python library for programmatic interaction with Git repositories. The vulnerability resides in the submodule handling logic: when Submodule.update() is invoked, it reads the path field from .gitmodules and uses that raw value to derive the absolute checkout location without applying Submodule._to_relative_path(), which enforces containment within the working tree. While an earlier fix (GHSA-hmq2-w58f-27jc) added Submodule._validated_name() to validate the name field, and the containment guard is used in Submodule.add() and Submodule.move(), update() was missed. A .gitmodules entry such as path = ../../../tmp/escaped therefore causes os.makedirs() to create directories outside the repository, which may then be populated with content cloned from the submodule URL, and can be removed via shutil.rmtree() if force_remove is used. The vulnerable flow is specifically triggered when updating submodules at a non-HEAD commit (e.g., a historical-commit API), because only then does the code derive the checkout path from the raw .gitmodules value rather than from a canonical tree lookup. The root cause is CWE-22 (Improper Limitation of a Pathname to a Restricted Directory), and affected products correspond to CPE cpe:2.3:a:gitpython-developers:gitpython:*:*:*:*:*:*:*:* (all versions before 3.1.62).

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 8.7 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
vuln.today AI 8.7 HIGH

Untrusted .gitmodules needs no auth (PR:N) but only the non-default non-HEAD update flow triggers it (AC:H); writes/deletes escape the working tree (S:C) giving I:H/A:H, no read so C:N.

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

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
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 26, 2026 - 14:02 EUVD
CVE Published
Sep 26, 2026 - 13:23 cve.org
HIGH 8.7

DescriptionCVE.org

GitPython before 3.1.62 does not validate the path field read from an untrusted .gitmodules file when updating submodules. While a prior fix (GHSA-hmq2-w58f-27jc) added Submodule._validated_name() to constrain the name field, and GitPython's own containment guard Submodule._to_relative_path() is applied in add() and move(), Submodule.update() derives the absolute checkout location from the raw path value without that guard. A .gitmodules entry containing directory traversal components (e.g., path = ../../../tmp/escaped) can therefore cause directories to be created via os.makedirs() outside the repository working tree, populated from the submodule URL on the clone path, and removed via shutil.rmtree() when force_remove is used. Exploitation requires an application flow that updates submodules at a non-HEAD commit (such as a historical-commit API); the common clone-then-update flow re-derives the path from a canonical tree lookup and is not affected. The issue is fixed in GitPython 3.1.62.

Blast Radius

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

Ecosystem-wide dependent count for version 3.1.62.

Technical POC Analysis

CWE-22 (the advisory also tags CWE-73): external control of a path that is meant to be confined to the repository working tree.

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, a widely used Python library embedded in CI/CD pipelines, release automation, and internal developer tooling, contains a path traversal flaw in its submodule update logic that allows an attacker-controlled repository to create, populate, or delete directories outside the intended project working tree. Exposure is limited to applications that check out submodules at historical (non-HEAD) commits, but those are precisely the build and deployment environments that typically hold elevated credentials and shared file-system access. Leadership should treat this as a supply-chain integrity issue affecting build hosts rather than a routine dependency bump, since the consequence is corruption or deletion of files outside the repository boundary.

Business Impact: Medium
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.4%
Top 68% exploitable
Prevalence
High
GitPython is a very widely used Python git-interaction library in tooling and CI
Data Quality
7 sources
Confidence: High
EUVD 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.4%
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
None
System Exposure· derived
Open
Automatable
No
Human Impact
Medium
Technical Impact
Partial

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
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-42215 HIGH POC
8.8 May 07

Command injection in GitPython 3.1.30-3.1.46 allows remote authenticated attackers to execute arbitrary commands via und

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

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Desktop 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

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