medium6.5
CVE-2026-78678
GitPython versions before 3.1.59 contain an incomplete denylist in the unsafe_git_revision_options guard that omits --contents and -S options, allowing attacke…
Impact
GitPython versions before 3.1.59 contain an incomplete denylist in the unsafe_git_revision_options 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 packages
| Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|
| pip | GitPython | <= 3.1.58 | 3.1.59 |
Affected products
| Vendor | Product | Affected versions |
|---|---|---|
| Gitpython Project | Gitpython | before 3.1.59 |
Weakness classification
References
- NVD record
- CVE.org record
- GitHub advisory
- https://github.com/advisories/GHSA-5xxx-qhh7-9287
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-5xxx-qhh7-9287
- https://nvd.nist.gov/vuln/detail/CVE-2026-78678
- https://github.com/pypa/advisory-database/tree/main/vulns/gitpython/PYSEC-2026-3788.yaml
- https://www.vulncheck.com/advisories/gitpython-before-arbitrary-file-read-via-repo-blame