Bug 2515274 (CVE-2026-73621)

Summary: CVE-2026-73621 gitpython: GitPython: Arbitrary File Truncation via Commit.count() Argument Injection
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: alinfoot, anthomas, bbrownin, derez, dfreiber, drow, dschmidt, dtrifiro, eglynn, ehelms, ggainey, jburrell, jdobes, jjoyce, jlanda, jmitchel, jpasqual, jpretori, jschluet, juwatts, kaycoth, kshier, lhh, mburns, mdellweg, mgarciac, mhulan, nmoumoul, orabin, osousa, pcreech, rbryant, rchan, rjohnson, simaishi, smallamp, stcannon, teagle, tmalecek, vkumar, weaton, yguenane
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A flaw was found in GitPython. An argument injection vulnerability in the `Commit.count()` method allows an attacker to control options passed to the method. By supplying a crafted `output` option, an attacker can cause the `git rev-list` command to truncate an arbitrary file to zero bytes. This enables the destruction or blanking of files at the process's privilege level, leading to data loss.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description OSIDB Bzimport 2026-08-13 12:19:51 UTC
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=<path>, causing 'git rev-list --output=<path>' 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).