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