CVE-2026-78678: GitPython: Incomplete unsafe_git_revision_options denylist omits --contents/-S, enabling arbitrary file read via Repo.blame()
Repo.blame() / Repo.blame_incremental() guard forwarded revision options against unsafe_git_revision_options, but that denylist only contains the file-WRITE options --output/-o. git blame also honors --contents <file> and -S <file>, which cause the file’s lines to be echoed into the blame result — an arbitrary file READ. Neither option is in the denylist, so a caller-influenced revision value of --contents=<path> passes the guard and leaks file contents. This is a distinct sink-option and impact class (READ) from GHSA-956x-8gvw-wg5v (which addressed the blame --output WRITE), directly analogous to GHSA-539m-9xh6-q6rr (archive READ gap accepted separately from the archive write/exec advisory).
References
- github.com/advisories/GHSA-5xxx-qhh7-9287
- github.com/gitpython-developers/GitPython/security/advisories/GHSA-5xxx-qhh7-9287
- github.com/pypa/advisory-database/tree/main/vulns/gitpython/PYSEC-2026-3788.yaml
- nvd.nist.gov/vuln/detail/CVE-2026-78678
- www.vulncheck.com/advisories/gitpython-before-arbitrary-file-read-via-repo-blame
Code Behaviors & Features
Detect and mitigate CVE-2026-78678 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →