Skip to main content

GitPython EUVDEUVD-2026-57825

| CVE-2026-73621 MEDIUM
Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') (CWE-88)
2026-08-13 VulnCheck GHSA-h75v-4jxv-ppxm
5.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Attacker submits output=<victim_path> via application interface
  2. Delivery
    Application forwards user options dict to commit.count(**user_options) without sanitization
  3. Exploit
    Unsanitized output= argument reaches git rev-list subprocess via commit.py:290-291
  4. Execution
    git rev-list opens and truncates target file to 0 bytes
  5. Persist
    Target file destroyed at process privilege level
  6. Impact
    Service disruption or configuration corruption

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Argument sanitization
Exploitation Conditions

The vulnerable application must explicitly forward a user-controlled keyword arguments dictionary to Commit.count() - specifically, the attacker must be able to supply the output= key in that dict. This is not the default usage of GitPython; it requires an application design decision to route external input into **kwargs. The injection does not affect Commit.count() called with no user-controlled arguments, nor does it affect iter_commits() or iter_items(), both of which raise UnsafeOptionError on the same payload. Exploitation is further limited by impact class: attackers gain only 0-byte truncation (no content control), and the set of targetable files is bounded by the OS privilege level of the running process. The application must use self.hexsha internally - ref control is not needed, reducing the precondition to option-key control only.

Impact

The provided CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N) scores 5.3 (Medium), reflecting network reachability and low complexity once an application routes user input into Commit.count(), but constrained by the PR:L requirement and limited VI:L/VA:L impact (no content control, no confidentiality loss). Real-world risk is tightly conditional: exploitation requires an application to explicitly forward a user-controlled options dict to count(), a pattern previously seen in GHSA-956x-8gvw-wg5v's archive(**kwargs) sink, meaning the attack surface is real but not universal. The raw score may underweight impact in privileged deployments where zero-byte truncation of config files, key material, or database files could cause cascading service failure. No CISA KEV listing is present, and no EPSS signal is available in the provided data to cross-reference exploitation probability - this gap should be monitored. The published proof-of-concept in the GHSA advisory lowers the technical bar for exploitation in vulnerable application patterns. The CVSS AC:L assessment by the reporter contrasts with the application-dependent precondition; defenders should treat this as AC:H in practice unless their codebase is confirmed to forward user options to count().

Exploit ScenarioDerived

A CI/CD dashboard or code-review application that accepts user-specified rev-list options and forwards them to Commit.count() - for instance, to support custom commit filtering - would allow an authenticated user to submit output=/etc/app/config.ini as an option. The underlying git rev-list subprocess would truncate that file to zero bytes, corrupting application configuration or destroying key material without the attacker ever needing write access to the filesystem directly. A proof-of-concept demonstrating this exact truncation was verified by the researcher on GitPython tag 3.1.53 and is published in GHSA-p538-c434-8v24.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 13, 2026

Arbitrary file truncation in GitPython before 3.1.56 enables an attacker who can control keyword arguments forwarded to Commit.count() to blank any file accessible at the process's privilege level by injecting output=<path>, which causes git rev-list to open and truncate the target to zero bytes before revision parsing. The unguarded sink at commit.py:290-291 is a distinct, overlooked parallel to the sibling iter_items method, which carries the check_unsafe_options guard; this gap persisted after GHSA-956x-8gvw-wg5v addressed iter_commits and blame. No CISA KEV listing is present, but a proof-of-concept was verified on tag 3.1.53 and is published in the GHSA advisory.

RemediationAI

Upgrade GitPython to version 3.1.56, which applies the check_unsafe_options guard to Commit.count() in parity with the protection already present in iter_items; this is the only confirmed fix. The upstream patch is available via PR #2184 (https://github.com/gitpython-developers/GitPython/pull/2184) and commit 38553b6fddc7f6a667cdb45a6762343a08fc72b2. The vendor advisory is at https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-p538-c434-8v24. If immediate upgrade is blocked, audit every call site that invokes Commit.count() with external or user-derived kwargs and add an explicit allowlist of safe rev-list options before forwarding - rejecting the output key is a targeted, low-side-effect control. Because the attack requires the application to route user input into the method's keyword arguments, a code-level review of option-forwarding patterns across all GitPython call sites (count, but also any other **kwargs sinks not yet identified) is an effective interim measure with no operational trade-offs.

Affected VersionsENISA

GitPython 0 <3.1.56

Affected Packages

pypi gitpython fix: 3.1.56

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

GitPython (cpe:2.3:a:gitpython-developers:gitpython:*:*:*:*:*:*:*:*) is a Python library abstracting Git subprocess invocations. The root cause is CWE-88 (Argument Injection): commit.py:290-291 executes self.repo.git.rev_list(self.hexsha, **kwargs) with no call to check_unsafe_options and no allow_unsafe_options parameter, meaning any caller-supplied keyword argument reaches the git subprocess unfiltered. Git's rev-list accepts --output=<path>, which causes it to open the named path for writing and truncate it to zero bytes as a side-effect of normal operation, even before any commits are enumerated. The sibling method iter_items (commit.py:341) was guarded against this class of injection; Commit.count was not patched alongside it during remediation of GHSA-956x-8gvw-wg5v, leaving a functionally identical but uncovered sink. Exploitation requires option-key control only - self.hexsha is used internally, so ref control is not necessary.

Know when Gitpython gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 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
vuln.today AI 4.2 MEDIUM

AC:H reflects the required application-level condition of forwarding user options to count(); PR:L because application access is needed; no confidentiality impact.

3.1 AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:L
4.0 AV:N/AC:H/AT:N/PR:L/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N
SUSE 5.4 MEDIUM
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L
Red Hat 5.4 MEDIUM

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
Low
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Aug 13, 2026 - 13:01 EUVD
CVE Published
Aug 13, 2026 - 11:28 cve.org
MEDIUM 5.3

DescriptionCVE.org

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

Threat Intelligence Overview

EPSS Score
0.2%
Top 90% exploitable
Prevalence
High
widely used Python Git library in CI/CD pipelines and developer tooling
Data Quality
7 sources
Confidence: High
EUVD 🇯🇵JVN NVD CVE.org EPSS Vulnrichment Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

CVE-2022-24439 CRITICAL POC
9.8 Dec 06

All versions of package gitpython are vulnerable to Remote Code Execution (RCE) due to improper user input validation, w

CVE-2026-78676 CRITICAL POC
9.3 Aug 25

Arbitrary code execution in GitPython before 3.1.59 arises from unsafe re-serialization of multi-line, quoted git-config

CVE-2026-78677 HIGH POC
8.7 Aug 25

Arbitrary directory creation and potential hook-based code execution in GitPython affects all releases before 3.1.59. Th

CVE-2026-78675 HIGH POC
8.6 Aug 25

GitPython before 3.1.59 discloses local file content through exception messages when parsing .gitmodules files that cont

CVE-2023-40590 HIGH POC
7.8 Aug 28

GitPython is a python library used to interact with Git repositories. Rated high severity (CVSS 7.8), this vulnerability

CVE-2026-78679 HIGH POC
7.1 Aug 25

Arbitrary file read in GitPython before 3.1.59 allows low-privileged remote attackers to exfiltrate sensitive files by s

CVE-2026-78678 HIGH POC
7.1 Aug 25

Arbitrary file read in GitPython versions before 3.1.59 exposes sensitive filesystem content to low-privileged network a

CVE-2023-41040 MEDIUM POC
6.5 Aug 30

GitPython is a python library used to interact with Git repositories. Rated medium severity (CVSS 6.5), this vulnerabili

CVE-2023-40267 CRITICAL
9.8 Aug 11

GitPython before 3.1.32 does not block insecure non-multi options in clone and clone_from. Rated critical severity (CVSS

CVE-2026-67324 CRITICAL
9.3 Aug 01

Command execution in GitPython 3.1.50 arises because its default unsafe-option gate fails to recognize joined short-opti

CVE-2026-67325 HIGH POC
8.7 Aug 01

Command injection in GitPython before 3.1.51 allows low-privileged attackers to bypass the `check_unsafe_options` blockl

CVE-2026-42215 HIGH POC
8.8 May 07

Command injection in GitPython 3.1.30-3.1.46 allows remote authenticated attackers to execute arbitrary commands via und

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
openSUSE Tumbleweed Fixed
SUSE Linux Enterprise Desktop 15 SP7 Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Affected
SUSE Linux Enterprise Module for Python 3 15 SP7 Affected
SUSE Linux Enterprise Server 15 SP7 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy