---
schema_version: '1.0'
id: security-20260910-ea9b74
title: CVE-2026-73621 — gitpython
url: https://osv.dev/vulnerability/PYSEC-2026-3950
url_hash: ea9b74f07e01294fa957c3c147c409c96e5c02ddd1c98b266b37e685efae7186
canonical_url: https://osv.dev/vulnerability/PYSEC-2026-3950
source: osv:pypa
category: security/library
category_raw: cve/library
region: null
tags:
- cve
- CVE-2026-73621
- PYSEC-2026-3950
- severity: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
- gitpython
- PyPI
lang: en
published_at: '2026-08-13T12:17:27Z'
fetched_at: '2026-09-10T15:44:17.926399Z'
updated_at: '2026-09-10T15:44:52Z'
status: published
content_hash: 01ff2aaedfc83739f6a31e84bc0b0da13b92da9211dd2dd1588271756373bdee
content_changed_at: null
license_note: full
summary: 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 Com
summary_source: rss
summary_en: 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 Com
summary_omitted_reason: null
redistribution: true
keywords_en:
- CVE
- CVE-2026-73621
- gitpython
- library vulnerability
- PyPI
- PYSEC-2026-3950
- software security
entities_en:
- name: CVE
  type: data
topics_en:
- library vulnerability
- software security
numeric_facts: []
entities:
- name: CVE
  type: data
key_facts: []
related: []
related_auto:
- name: 集団的免疫力
  type: concept
  weight: 1.0
computed_at: '2026-09-10T15:44:49Z'
---

# CVE-2026-73621 — gitpython

## TL;DR
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 Com

## Key Points
- cve / CVE-2026-73621 / PYSEC-2026-3950 / severity: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 / gitpython / PyPI

## Details
**Severity:** 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
**Advisory:** PYSEC-2026-3950 (CVE-2026-73621)

**Details:**
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).

**References:**
- https://www.vulncheck.com/advisories/gitpython-before-arbitrary-file-truncation-via-commit-count
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-p538-c434-8v24

_Data: OSV.dev (upstream: pypa) — https://osv.dev/vulnerability/PYSEC-2026-3950_

## Source
元記事: [CVE-2026-73621 — gitpython](https://osv.dev/vulnerability/PYSEC-2026-3950) — published 2026-08-13T12:17:27Z
