ZeroHour

CVE-2026-73620

PoC large

Argument injection in GitPython enables arbitrary file read and overwrite

CVSS 4.0
7.2 high
EPSS
<1%p29
Published
()
Modified
AI analysis

GitPython before 3.1.57 does not guard which git options are forwarded when applications call IndexFile.checkout() or TagReference.create(), so attacker-influenced kwargs are passed through to the underlying git command. An attacker who can control those arguments can inject git options such as --prefix to overwrite arbitrary files with repository content, or -F to read arbitrary files whose contents are returned in-band. The flaw is tracked as path/option injection (CWE-22) with a CVSS 4.0 base score of 7.2 (high), requiring network access and low privileges but no user interaction. Any Python application or tooling using GitPython below 3.1.57 that passes untrusted values into these APIs is affected, while applications that never expose these methods to attacker-controlled input are largely unaffected. Exploitation has not been confirmed in the wild: it is not on CISA KEV, EPSS estimates a 0.4% probability of exploitation within 30 days, and the only public reference is the upstream advisory with a proof of concept (GHSA-3f7w-8rr8-f37f).

What to do: Upgrade to GitPython 3.1.57 or later. Audit all call sites of IndexFile.checkout() and TagReference.create() for attacker-controlled kwargs, and validate or allowlist git options so user-supplied strings like --prefix or -F cannot be forwarded to git. No in-the-wild exploitation is currently reported, but review the upstream advisory GHSA-3f7w-8rr8-f37f for details on the proof-of-concept attack paths.

Affected
gitpython project gitpythonbefore 3.1.57
Estimated exposure
largehundreds of thousands of Python environments (tens of millions of monthly PyPI downloads) — GitPython is one of the most widely installed Python Git libraries, with tens of millions of monthly PyPI downloads and common bundling in CI/CD and developer tooling, so the installed base plausibly reaches hundreds of thousands of…

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.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.

Vendors
gitpython project
Products
gitpython
Weakness
CWE-22
Vector
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/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

In the news

No ingested article mentions this CVE yet.