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

- Severity: Medium 5.3 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 11% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-08-03T20:23:17.000Z
- Modified: 2026-10-24T15:10:00.190Z
- Also known as: GHSA-p538-c434-8v24, PYSEC-2026-3950
- Weaknesses: CWE-88
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: VulnCheck

## 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=<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).

(As written by CVE List.)

## Affected

- gitpython-developers GitPython: before 3.1.56 (not affected: 3.1.56)
- gitpython (PyPI): before 3.1.56
- gitpython_project gitpython: before 3.1.56

## Every score

- VulnCheck: CVSS:4.0 5.3 Medium `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`
- VulnCheck: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L`
- GitHub: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L`
- PyPA Advisory Database: CVSS:4.0 `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`

## References

- <https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-p538-c434-8v24> (exploit, evidence, vendor-advisory, web)
- <https://www.vulncheck.com/advisories/gitpython-before-arbitrary-file-truncation-via-commit-count> (advisory, third-party-advisory)
- <https://github.com/gitpython-developers/GitPython/pull/2184> (web)
- <https://github.com/gitpython-developers/GitPython/commit/38553b6fddc7f6a667cdb45a6762343a08fc72b2> (web)
- <https://github.com/gitpython-developers/GitPython> (package)
- <https://github.com/gitpython-developers/GitPython/releases/tag/3.1.56> (web)

## Sources

- CVE List: [CVE-2026-73621](https://www.cve.org/CVERecord?id=CVE-2026-73621), CVE Terms of Use, modified 2026-10-08
- GitHub Advisory Database: [GHSA-p538-c434-8v24](https://github.com/advisories/GHSA-p538-c434-8v24), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-73621](https://nvd.nist.gov/vuln/detail/CVE-2026-73621), Public domain, modified 2026-10-24
- PyPA Advisory Database: [PYSEC-2026-3950](https://osv.dev/vulnerability/PYSEC-2026-3950), CC-BY-4.0, modified 2026-09-10

---

Page: https://cve.day/CVE-2026-73621 · Whole record: https://cve.day/CVE-2026-73621.json · Rebuilt by cve.day 2026-11-25T22:59:32.708Z
