Impact
GitPython versions before 3.1.58 do not validate certain options passed to git rm and git checkout commands in the IndexFile.remove() and Head.checkout() functions. An attacker can supply the --pathspec-from-file and --pathspec-file-nul parameters so that Git attempts to read the file specified by the attacker. The full contents of that file are returned in GitCommandError.stderr, allowing the attacker to extract data from files that the process can read.
Affected Systems
The vulnerability affects the GitPython library for any deployment using versions earlier than 3.1.58. It applies to all environments where an unpatched version of the open‑source GitPython project is imported and used in Python code.
Risk and Exploitability
With a CVSS score of 7.1, the flaw presents a medium‑to‑high risk. The EPSS score is not available and the flaw is not yet listed in CISA KEV, suggesting no widespread exploitation yet. Based on the description, it is inferred that exploitation requires an attacker to influence which options are passed to git rm or git checkout, such as by controlling input to the library’s functions. Once those parameters are set, the vulnerable code reads the specified file and leaks its contents via the error output, giving attackers read access to arbitrary files accessible to the process.
OpenCVE Enrichment