CVE-2026-78678: GitPython before 3.1.59 Arbitrary File Read via Repo.blame()
GitPython versions before 3.1.59 contain an incomplete denylist in the unsafegitrevisionoptions guard that omits --contents and -S options, allowing attackers to read arbitrary files by passing these options to Repo.blame(). Attackers can supply revision values like --contents=/etc/passwd to leak file contents through the blame result returned to the caller.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
GitPythonto a version that resolves this vulnerability.Fixed in 3.1.59
Event History
Frequently Asked Questions
What application behavior creates exposure to this issue?
An application is exposed when it passes attacker-controlled revision values to GitPython's Repo.blame() method. The vulnerable guard can be bypassed with revision options including --contents or -S.
What level of access does an attacker need?
The CVSS vector indicates low privileges are required. The attacker must be able to provide a value that is used as the revision argument to Repo.blame().
What is the practical impact of successful exploitation?
An attacker can use a value such as --contents=/etc/passwd to cause file contents to be returned through the blame result. The stated impact is disclosure of arbitrary readable files, with no integrity or availability impact indicated.