Description
GitPython versions before 3.1.54 contain an arbitrary file overwrite vulnerability in the Diffable.diff method that fails to validate git options passed through kwargs. Attackers can supply the --output argument via the other parameter or output kwarg to write patch content to attacker-chosen file paths at process privilege level.
Published: 2026-08-13
Score: 7.2 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

GitPython versions before 3.1.54 contain an arbitrary file overwrite flaw in the Diffable.diff method. The vulnerability arises because the method does not validate git options supplied through kwargs, allowing an attacker to pass a --output parameter via the diff arguments. The attacker can then cause patch content to be written to an attacker‑chosen file path with the privileges of the running process, potentially leading to tampering of configuration files or insertion of malicious code.

Affected Systems

Issues affect the GitPython library distributed by the gitpython‑developers team. Versions prior to 3.1.54 are vulnerable. Upgrading to 3.1.54 or later is required.

Risk and Exploitability

The CVSS score of 7.2 indicates a high severity. EPSS is not available, and the vulnerability is not listed in KEV. Attackers would need to run code that invokes Diffable.diff with crafted arguments. This implies that the vulnerability is exploitable in environments where a Python application or service using GitPython processes untrusted input or repository data. The attack can result in arbitrary file modification and, if the process runs with elevated privileges, could lead to further compromise. Based on the description, the likely attack vector is an attacker executing code that provides malicious diff arguments to Diffable.diff, allowing arbitrary file overwrite.

Generated by OpenCVE AI on August 13, 2026 at 13:02 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade GitPython to 3.1.54 or newer.
  • If upgrading is not immediately possible, avoid passing untrusted input to Diffable.diff and remove the --output parameter from kwarg.
  • Review and restrict the file system permissions of the process that uses GitPython to limit write access to critical directories.

Generated by OpenCVE AI on August 13, 2026 at 13:02 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 13 Aug 2026 13:00:00 +0000

Type Values Removed Values Added
First Time appeared Gitpython-developers
Gitpython-developers gitpython
Vendors & Products Gitpython-developers
Gitpython-developers gitpython

Thu, 13 Aug 2026 11:45:00 +0000

Type Values Removed Values Added
Description GitPython versions before 3.1.54 contain an arbitrary file overwrite vulnerability in the Diffable.diff method that fails to validate git options passed through kwargs. Attackers can supply the --output argument via the other parameter or output kwarg to write patch content to attacker-chosen file paths at process privilege level.
Title GitPython before 3.1.54 Arbitrary File Overwrite via diff
Weaknesses CWE-88
References
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H'}

cvssV4_0

{'score': 7.2, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N'}


Subscriptions

Gitpython-developers Gitpython
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-13T15:05:11.349Z

Reserved: 2026-08-13T11:17:25.160Z

Link: CVE-2026-73624

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-13T12:17:27.617

Modified: 2026-08-13T15:20:21.133

Link: CVE-2026-73624

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-13T13:15:04Z

Weaknesses
  • CWE-88

    Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')