CVE-2026-73620

GitPython before 3.1.57 Arbitrary File Overwrite and Read

Published Aug 13, 2026 CVSS 4.0 · 7.2 High EPSS < 1% KEV · Not listed
Description
GitPython before 3.1.57 fails to guard git option forwarding in IndexFile.checkout() and TagReference.create(), allowing attackers to pass unsafe options via kwargs. Attackers can use --prefix to overwrite arbitrary files with repository content or -F to read arbitrary files returned in-band.

Analysis

AI-generated

Technical impact

GitPython prior to 3.1.57 does not guard git option forwarding in IndexFile.checkout() and TagReference.create(), allowing attackers to inject unsafe options such as --prefix for arbitrary file overwrite and -F for arbitrary file read. This flaw enables attackers to overwrite any file or read any file via repository content, thereby compromising confidentiality and integrity. The weakness is identified as CWE-22 and CWE-88, indicating a failure to validate paths and to prevent unauthorized file inclusion or read.

Affected Systems

All versions of GitPython before 3.1.57 are affected. The library is maintained by the GitPython developers and is commonly integrated into Python applications that interact with Git repositories.

Risk and Exploitability

The CVSS score of 7.2 indicates a high severity vulnerability. An EPSS score of <1% demonstrates a low probability of exploitation, and the vulnerability is not listed in CISA KEV. Nevertheless, once an attacker manages to inject unsafe git options—such as --prefix for file overwrite or -F for file read—the impact is immediate and severe: arbitrary files can be overwritten or read, potentially compromising configuration, source code, or other sensitive data. Thus, while the empirical likelihood of exploitation may be low, the potential impact is critical, and the overall risk remains high.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade GitPython to version 3.1.57 or later to remove the vulnerability.
  • If upgrading cannot be performed immediately, modify the application to validate and whitelist keyword arguments passed to IndexFile.checkout() and TagReference.create(), rejecting unsafe options such as --prefix and -F.
  • Configure the execution environment (e.g., container isolation or file system permissions) to prevent writing to or reading from critical files via the GitPython interface until a patch is applied.

Generated by OpenCVE AI on August 15, 2026 at 01:53 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4872-1 python-git security update
History
Type Values Removed Values Added
First Time appeared Gitpython Project
Gitpython Project gitpython
CPEs cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:python:*:*
Vendors & Products Gitpython Project
Gitpython Project gitpython
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Gitpython-developers
Gitpython-developers gitpython
Vendors & Products Gitpython-developers
Gitpython-developers gitpython
Type Values Removed Values Added
Description GitPython before 3.1.57 fails to guard git option forwarding in IndexFile.checkout() and TagReference.create(), allowing attackers to pass unsafe options via kwargs. Attackers can use --prefix to overwrite arbitrary files with repository content or -F to read arbitrary files returned in-band.
Title GitPython before 3.1.57 Arbitrary File Overwrite and Read
Weaknesses CWE-22
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'}

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

  • CWE-88

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

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Oct 8, 2026, 3:24 PM
Reserved
Aug 13, 2026, 11:16 AM
Status
Analyzed
Published
Aug 13, 2026, 12:17 PM
Modified
Oct 24, 2026, 3:10 PM
Severity
Important
Public date
Aug 13, 2026, 11:28 AM