ZeroHour

CVE-2026-73621

PoC large

Argument Injection in GitPython Commit.count() Allows Arbitrary File Truncation

CVSS 4.0
5.3 medium
EPSS
<1%p11
Published
()
Modified
AI analysis

CVE-2026-73621 is an argument injection flaw (CWE-88) in GitPython before 3.1.56: the Commit.count() method forwards keyword arguments straight to 'git rev-list' without the check_unsafe_options guard applied by its sibling iter_items method. An attacker who can influence the options passed to Commit.count() — for example, when an application forwards a user-supplied options dictionary — can inject an output=<path> option, causing 'git rev-list --output=<path>' to open and truncate the target file to zero bytes before revision parsing. The attacker gains destruction of an arbitrary file (blanked to 0 bytes) with the privileges of the process running GitPython, but cannot control file contents and there is no confidentiality impact. Any deployment of GitPython before 3.1.56 in which user-controlled option dictionaries reach Commit.count() is affected; the flaw is rated 5.3 (Medium) under CVSS 4.0. Exploitation has not been observed in the wild: the flaw is absent from CISA KEV, carries a low EPSS probability of 0.2% (11th percentile), and the only public reference is the upstream advisory GHSA-p538-c434-8v24.

What to do: Upgrade to GitPython 3.1.56 or later. As an interim mitigation, audit call sites of Commit.count() and do not pass user-controlled dictionaries as options — validate and whitelist allowed keys (blocking 'output' and other option-like values) or build arguments server-side. Prioritize review of applications where untrusted input can reach Commit.count(), since any truncated file is zeroed with the privileges of the process running GitPython.

Affected
gitpython project GitPythonall versions before 3.1.56 (fixed in 3.1.56)
Estimated exposure
largetens of thousands of environments plausibly affected (estimated; the exploitable subset depends on application usage of Commit.count() with user-controlled… — GitPython is among the most widely downloaded Python packages on PyPI (millions of downloads per month) and is bundled in many developer and CI tools, implying a very large installed base, but exploitation additionally requires the…

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.56 contains an argument injection vulnerability in the Commit.count() method, which forwards keyword arguments to 'git rev-list' without the check_unsafe_options guard present in the sibling iter_items method. An attacker who can control options passed to Commit.count (e.g., via an application that forwards a user-supplied options dict) can supply output= , causing 'git rev-list --output= ' to open and truncate the target file to zero bytes before revision parsing. This allows destruction/blanking of an arbitrary file at the process's privilege level (no content control, 0-byte truncation).

Vendors
gitpython project
Products
gitpython
Weakness
CWE-88
Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:L/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.