# CVE-2026-73621: GitPython before 3.1.56 Arbitrary File Truncation via Commit.count

- Priority: **Routine**
- Reason: Not severe (CVSS 5.3, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-08-13 · Modified: 2026-10-08
- Aliases: GHSA-p538-c434-8v24, PYSEC-2026-3950, UBUNTU-CVE-2026-73621, DEBIAN-CVE-2026-73621
- Record: https://cvemate.com/vulnerability/CVE-2026-73621 · JSON: https://cvemate.com/vulnerability/CVE-2026-73621/json

## Description

```text
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).
```

## Signals

- CVSS: 5.4 medium (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L
- EPSS: 0.211%, percentile 11.906%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (github)

## Affected

- debian python-git (Debian): All versions (No fix recorded) \| \< 3.1.30-1+deb12u3 \| \< 3.1.44-1+deb13u1 \| \< 3.1.61-1
- ubuntu python-git (Ubuntu): All versions (No fix recorded)
- gitpython\_project gitpython: \< 3.1.56
- gitpython-developers gitpython: \< 3.1.56
- PyPI gitpython (PyPI): \< 3.1.56

## References

- <https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-p538-c434-8v24>
- <https://www.vulncheck.com/advisories/gitpython-before-arbitrary-file-truncation-via-commit-count>
- <https://github.com/gitpython-developers/GitPython/pull/2184>
- <https://github.com/gitpython-developers/GitPython/commit/38553b6fddc7f6a667cdb45a6762343a08fc72b2>
- <https://github.com/gitpython-developers/GitPython>
- <https://github.com/gitpython-developers/GitPython/releases/tag/3.1.56>
- <https://ubuntu.com/security/CVE-2026-73621>
- <https://www.cve.org/CVERecord?id=CVE-2026-73621>
- <https://security-tracker.debian.org/tracker/CVE-2026-73621>

---

Data as of 2026-12-05T05:10:08.971Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
