Skip to content
Heist/ feed
Medium

GitPython before 3.1.56 Arbitrary File Truncation via Commit.count

Type: advisorySource: Official CVE List1 source record

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

Announced Group revision 1
Original source ↗

CVE-2026-73621

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2026-73621

GitPython

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "vendor": "gitpython-developers",
    "product": "GitPython",
    "versions": [
      {
        "status": "affected",
        "version": "0",
        "lessThan": "3.1.56",
        "versionType": "semver"
      },
      {
        "status": "unaffected",
        "version": "3.1.56",
        "versionType": "semver"
      }
    ],
    "packageURL": "pkg:pypi/gitpython",
    "defaultStatus": "unaffected"
  }
]
Related CVEs
CVE-2026-73621

Source reference: /cveMetadata/cveId

Publisher severity

medium

Source reference: /containers/cna/metrics

Event
#12850 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement