ZeroHour

CVE-2026-76222

PoC mass

Path traversal in GitPython allows arbitrary repository creation outside clone directory

CVSS 4.0
8.4 high
EPSS
<1%p26
Published
()
Modified
AI analysis

CVE-2026-76222 is a path-traversal flaw (CWE-22) in the GitPython Python library, which fails to validate submodule names read from a repository's .gitmodules file. It is triggered when GitPython versions before 3.1.58 initialize submodules from a crafted repository whose submodule names contain path-traversal sequences. As a result, an attacker who supplies a malicious repository can cause GitPython to create attacker-controlled Git repositories at arbitrary filesystem paths outside the intended clone directory, producing high integrity impact (per CVSS 4.0) with no confidentiality loss and only low availability impact. Any application, script, or CI/CD automation using GitPython before 3.1.58 to clone or process untrusted repositories is affected. Exploitation has not been confirmed in the wild: a public advisory/PoC reference (GHSA-hmq2-w58f-27jc) exists, the flaw is not in CISA KEV, and EPSS estimates roughly a 0.3% probability of exploitation in the next 30 days.

What to do: Upgrade to GitPython 3.1.58 or later via pip. Until patched, avoid using GitPython to initialize submodules from untrusted or attacker-supplied repositories. Also audit hosts where GitPython has processed untrusted repositories for unexpected .git directories created outside the intended clone path.

Affected
gitpython project GitPythonall versions before 3.1.58 (< 3.1.58)
Estimated exposure
massmillions of installations (GitPython records tens of millions of pip downloads per month; exact installed base unknown) — Estimated from GitPython's status as one of the most-downloaded packages on PyPI and its broad use as a dependency in developer tooling and CI/CD pipelines, which implies a multi-million installed base, though only environments that…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

GitPython before 3.1.58 fails to validate submodule names from .gitmodules files, allowing attackers to create Git repositories at arbitrary filesystem paths outside the intended clone directory. Attackers can craft malicious repositories with traversal sequences in submodule names that GitPython processes during submodule initialization, creating attacker-controlled Git repositories at escaped filesystem locations.

Vendors
gitpython project
Products
gitpython
Ecosystems
pip
Weakness
CWE-22
Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:H/SA:L/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
GHSA
GHSA-hmq2-w58f-27jc (high)

In the news

No ingested article mentions this CVE yet.