Impact
GitPython versions before 3.1.59 contain an incomplete denylist that omits the --contents and -S options from the unsafe_git_revision_options guard. When these options are passed to Repo.blame(), the function treats them as revision strings and returns the contents of the specified file through the blame output. This flaw allows an attacker to read any file accessible to the running process, potentially leaking sensitive data such as /etc/passwd.
Affected Systems
The vulnerability affects all installations of GitPython with a version earlier than 3.1.59. The product is maintained by the gitpython-developers organization.
Risk and Exploitability
The CVSS score is 7.1, indicating a high impact that compromises confidentiality. EPSS data is not available, and the vulnerability is not listed in the CISA KEV catalog. Based on the description, any user who can invoke Repo.blame() in the application can exploit the flaw; the attack requires no network connectivity beyond what the application itself provides. The ability to read arbitrary files makes the flaw exploitable in both local and potentially remote contexts if the application is exposed to untrusted input.
OpenCVE Enrichment
Github GHSA