CVE-2026-78675: GitPython: Arbitrary local file content disclosure via [include] directive in untrusted .gitmodules (SubmoduleConfigParser never disables merge_includes)
Non-blind local file content disclosure (first line) of any file readable by the victim process, triggered purely by attacker-controlled repository content and one routine, read-only GitPython call. Bounded to one line per triggering file (parsing aborts at the first MissingSectionHeaderError), but that line very often is the secret — .env files (DATABASE_URL=..., API_KEY=...), single-line credential/token files, /etc/passwd’s root entry for host fingerprinting. The primitive additionally serves as a generic error-based file-existence oracle for arbitrary host paths. This is materially stronger than the already-fixed, explicitly blind GHSA-cwvm-v4w8-q58c (“Blind local file inclusion”, CVSS 4.0, git/refs/symbolic.py ref-name resolution) — that advisory’s own writeup states it cannot disclose content; this one does, verbatim, via a different module (git/config.py’s include resolution).
References
- github.com/advisories/GHSA-7833-fr7j-v32q
- github.com/gitpython-developers/GitPython/commit/ef7568e3b317ce617eacda39b8b54dcdff8c3b5c
- github.com/gitpython-developers/GitPython/pull/2211
- github.com/gitpython-developers/GitPython/releases/tag/3.1.59
- github.com/gitpython-developers/GitPython/security/advisories/GHSA-7833-fr7j-v32q
- github.com/pypa/advisory-database/tree/main/vulns/gitpython/PYSEC-2026-3785.yaml
- nvd.nist.gov/vuln/detail/CVE-2026-78675
- www.vulncheck.com/advisories/gitpython-before-local-file-content-disclosure-via-gitmodules
Code Behaviors & Features
Detect and mitigate CVE-2026-78675 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →