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.
OpenCVE Enrichment