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.
Fix
Patch, vendor advisory and mitigation references on NVD 2
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-5xxx-qhh7-9287 Exploit, Vendor Advisory
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-5xxx-qhh7-9287 Exploit, Vendor Advisory
Every line above is quoted from NVD, CISA, Microsoft, the vendor's own advisory or DISA; nothing is generated.
Change history 1
- First seenCVSS 7.1 · gitpython_projectNVD modified 2026-10-12 15:10
Affected (CPE criteria) 1
cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:python:*:*
References 3
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-5xxx-qhh7-9287 Exploit, Vendor Advisory
- https://www.vulncheck.com/advisories/gitpython-before-arbitrary-file-read-via-repo-blame Third Party Advisory
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-5xxx-qhh7-9287 Exploit, Vendor Advisory