Impact
GitPython versions before 3.1.54 contain an arbitrary file overwrite flaw in the Diffable.diff method. The vulnerability arises because the method does not validate git options supplied through kwargs, allowing an attacker to pass a --output parameter via the diff arguments. The attacker can then cause patch content to be written to an attacker‑chosen file path with the privileges of the running process, potentially leading to tampering of configuration files or insertion of malicious code.
Affected Systems
Issues affect the GitPython library distributed by the gitpython‑developers team. Versions prior to 3.1.54 are vulnerable. Upgrading to 3.1.54 or later is required.
Risk and Exploitability
The CVSS score of 7.2 indicates a high severity. EPSS is not available, and the vulnerability is not listed in KEV. Attackers would need to run code that invokes Diffable.diff with crafted arguments. This implies that the vulnerability is exploitable in environments where a Python application or service using GitPython processes untrusted input or repository data. The attack can result in arbitrary file modification and, if the process runs with elevated privileges, could lead to further compromise. Based on the description, the likely attack vector is an attacker executing code that provides malicious diff arguments to Diffable.diff, allowing arbitrary file overwrite.
OpenCVE Enrichment