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.
Published: 2026-08-13
Score: 7.2 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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, indicating a failure to validate paths.

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 denotes a High severity vulnerability. No EPSS score is currently available and the vulnerability is not listed in CISA KEV, so the empirical likelihood of exploitation remains uncertain. Based on the description, it is inferred that the attacker must have the ability to dictate or manipulate keyword arguments passed to the vulnerable functions; this typically occurs in an application that forwards untrusted input, implying the attack vector is through code that constructs these calls. Once the attacker succeeds in injecting the options, the impact is immediate and severe: arbitrary file overwrite via --prefix or arbitrary file read via -F, potentially exposing or destroying configuration, source code, or other sensitive files. Therefore, the risk is high and the likelihood of exploitation in a suitable environment should be considered serious.

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

Remediation

No vendor fix or workaround currently provided.

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 13, 2026 at 13:03 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

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

Type Values Removed Values Added
Metrics ssvc

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


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 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'}


Subscriptions

Gitpython-developers Gitpython
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-13T15:01:15.162Z

Reserved: 2026-08-13T11:16:27.835Z

Link: CVE-2026-73620

cve-icon Vulnrichment

Updated: 2026-08-13T15:01:11.108Z

cve-icon NVD

Status : Received

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

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

Link: CVE-2026-73620

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

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

Weaknesses
  • CWE-22

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