CVE-2026-73621: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') in gitpython-developers GitPython
## Summary `Commit.count()` forwards `**kwargs` into `rev_list` with **no** `check_unsafe_options` guard (the guard exists only in the sibling `iter_items`, commit.py:341). `git rev-list --output=<path>` opens and truncates the target file to 0 bytes before revision parsing, so `count(output='/victim')` destroys/blanks an arbitrary file. ## Root Cause `commit.py:290-291` calls `self.repo.git.rev_list(self.hexsha, **kwargs)` with no `check_unsafe_options` and no `allow_unsafe_options` parameter. The sibling `iter_items` (commit.py:341) is guarded; `count` is not. This is a distinct, uncovered sink — GHSA-956x-8gvw-wg5v fixed `iter_commits`/`blame`, not `count`. ## Impact Destroy/blank an arbitrary file at process privilege (integrity/availability). Reachability is key-control only (`count` uses `self.hexsha`, not a user ref), and the write is a 0-byte truncation (no content control), so MEDIUM. ## Proof of Concept ```python commit.count(output='/path/to/victim') # victim truncated to 0 bytes (verified) # control: commit.iter_commits(output=...) raises UnsafeOptionError ``` ## Attack Chain 1. Entry: app forwards user options -> `commit.count(output='/victim')`. Guard: none. Bypass proof: `iter_commits(output=)` raises UnsafeOptionError; `count(output=)` does not — verified side-by-side. 2. Sink: `git rev-list <sha> --output=/victim` -> file truncated to 0 bytes. Impact: destroy/blank arbitrary file. ## Bypass Evidence Live-verified on HEAD (tag 3.1.53): `count(output=<victim>)` truncated a pre-existing file to 0 bytes; guarded `iter_commits(output=)` raised UnsafeOptionError. Same CNA-accepted "app forwards user options dict" model as GHSA-956x-8gvw-wg5v's `archive(**kwargs)`. Uncovered sink, not a duplicate. ## Affected Versions `<= 3.1.53` ## Suggested Fix Add `check_unsafe_options` to `Commit.count` (mirroring `iter_items`). --- Reported by **zx (Jace)** — GitHub: @manus-use
AI Analysis
Technical Summary
CVE-2026-73621 is an argument injection vulnerability in GitPython prior to version 3.1.56. The Commit.count() method forwards user-controllable keyword arguments directly to the 'git rev-list' command without the check_unsafe_options guard that is present in the iter_items method. An attacker able to influence the options passed to Commit.count can supply an output=<path> argument, causing 'git rev-list --output=<path>' to open and truncate the specified file to zero bytes before processing revisions. This leads to the destruction or blanking of arbitrary files with the privileges of the running process.
Potential Impact
An attacker who can control the options passed to Commit.count() can cause arbitrary files to be truncated to zero bytes, effectively destroying their contents. This occurs at the privilege level of the process running GitPython, potentially leading to denial of service or data loss. There is no control over the content written, only truncation to zero bytes.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, avoid passing untrusted or user-supplied options to the Commit.count() method to prevent exploitation of this vulnerability.
CVE-2026-73621: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') in gitpython-developers GitPython
Description
## Summary `Commit.count()` forwards `**kwargs` into `rev_list` with **no** `check_unsafe_options` guard (the guard exists only in the sibling `iter_items`, commit.py:341). `git rev-list --output=<path>` opens and truncates the target file to 0 bytes before revision parsing, so `count(output='/victim')` destroys/blanks an arbitrary file. ## Root Cause `commit.py:290-291` calls `self.repo.git.rev_list(self.hexsha, **kwargs)` with no `check_unsafe_options` and no `allow_unsafe_options` parameter. The sibling `iter_items` (commit.py:341) is guarded; `count` is not. This is a distinct, uncovered sink — GHSA-956x-8gvw-wg5v fixed `iter_commits`/`blame`, not `count`. ## Impact Destroy/blank an arbitrary file at process privilege (integrity/availability). Reachability is key-control only (`count` uses `self.hexsha`, not a user ref), and the write is a 0-byte truncation (no content control), so MEDIUM. ## Proof of Concept ```python commit.count(output='/path/to/victim') # victim truncated to 0 bytes (verified) # control: commit.iter_commits(output=...) raises UnsafeOptionError ``` ## Attack Chain 1. Entry: app forwards user options -> `commit.count(output='/victim')`. Guard: none. Bypass proof: `iter_commits(output=)` raises UnsafeOptionError; `count(output=)` does not — verified side-by-side. 2. Sink: `git rev-list <sha> --output=/victim` -> file truncated to 0 bytes. Impact: destroy/blank arbitrary file. ## Bypass Evidence Live-verified on HEAD (tag 3.1.53): `count(output=<victim>)` truncated a pre-existing file to 0 bytes; guarded `iter_commits(output=)` raised UnsafeOptionError. Same CNA-accepted "app forwards user options dict" model as GHSA-956x-8gvw-wg5v's `archive(**kwargs)`. Uncovered sink, not a duplicate. ## Affected Versions `<= 3.1.53` ## Suggested Fix Add `check_unsafe_options` to `Commit.count` (mirroring `iter_items`). --- Reported by **zx (Jace)** — GitHub: @manus-use
CVSS v4.0
Score 5.3medium
Affected software
gitpython-developers
GitPython
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-73621 is an argument injection vulnerability in GitPython prior to version 3.1.56. The Commit.count() method forwards user-controllable keyword arguments directly to the 'git rev-list' command without the check_unsafe_options guard that is present in the iter_items method. An attacker able to influence the options passed to Commit.count can supply an output=<path> argument, causing 'git rev-list --output=<path>' to open and truncate the specified file to zero bytes before processing revisions. This leads to the destruction or blanking of arbitrary files with the privileges of the running process.
Potential Impact
An attacker who can control the options passed to Commit.count() can cause arbitrary files to be truncated to zero bytes, effectively destroying their contents. This occurs at the privilege level of the process running GitPython, potentially leading to denial of service or data loss. There is no control over the content written, only truncation to zero bytes.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, avoid passing untrusted or user-supplied options to the Commit.count() method to prevent exploitation of this vulnerability.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-08-13T11:17:25.160Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6a7dbdfbbf8831d5393225f5
Added to database: 08/13/2026, 12:52:11 UTC
Last enriched: 08/13/2026, 12:56:35 UTC
Last updated: 09/29/2026, 01:47:44 UTC
Views: 63
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.