Impact
GitPython versions earlier than 3.1.51 allow an attacker to inject arbitrary Git options when calling Repo.archive() or git.ls_remote(), passing options such as --exec or --upload-pack directly to the Git binary and yielding command execution. The methods Repo.iter_commits() and Repo.blame() also fail to reject leading-dash revision arguments, so a revision like --output=<path> can cause Git to create or truncate a file at an attacker‑controlled location, enabling data loss or tampering. This vulnerability is a command injection flaw (CWE‑77).
Affected Systems
The vulnerability affects the GitPython project distributed by the gitpython‑developers. Versions before 3.1.51 are vulnerable; no other vendor or product details are listed.
Risk and Exploitability
The CVSS score of 8.6 indicates high severity, and the vulnerability is not listed in the CISA KEV catalog. Exploitation requires an application that forwards untrusted arguments to the affected methods, making the attack vector an application‑level privilege escalation that can lead to arbitrary command execution. EPSS data are not available, so the likelihood of exploitation cannot be quantified from the current information.
OpenCVE Enrichment