Vulnerability · Published Sep 26, 2026 · Assigned by VulnCheck

CVE-2026-100689GitPython before 3.1.62 Path Traversal via gitmodules path

Medium 5.9

In plain English

A medium-severity path traversal in GitPython from gitpython-developers. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 35% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.9Medium
Exploit odds (30 days)0.4%top 65.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12python-git3.1.30-1+deb12u3DEBIAN-CVE-2026-100689
Debian:13python-git3.1.44-1+deb13u1DEBIAN-CVE-2026-100689
Debian:14python-git3.1.62-1DEBIAN-CVE-2026-100689
PyPIgitpython3.1.62GHSA-59cr-6r3x-644w
Ubuntu:26.10python-gitno fix listedUBUNTU-CVE-2026-100689

Affected products (as reported)

VendorProductVersions
gitpython-developers GitPython 0 – before 3.1.62

Weakness: CWE-22 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L

References