CVE-2026-78675
PoC massLocal File Disclosure via [include] Directive in GitPython .gitmodules Parsing
GitPython (version 3.1.58 and earlier; flaw confirmed at repo HEAD commit 9729ed3b dated 2026-08-05) exposes local file contents because Submodule._config_parser(), which parses every repository's .gitmodules file, constructs SubmoduleConfigParser without disabling the merge_includes default of True, so [include] directives embedded in .gitmodules are followed and merged. An attacker who controls the .gitmodules of a repository that a victim clones can point an include at any readable local file — absolute paths short-circuit any path join, relative paths are joined with no check that they stay inside the repository, and '~' is expanded — with the only pre-open gate being a readability check. When the targeted file lacks a git-config [section] header, which is true of most non-config files, the raised MissingSectionHeaderError embeds the verbatim first line of the file in its message, and files that do parse are merged into the submodule configuration, either disclosing or incorporating local file content. Any application, CI job, or automation that enumerates or reads submodule configuration (repo.submodules, Submodule.config(), Submodule.iter_items()) on repositories from untrusted sources is affected. There is no known public proof-of-concept, the flaw is not in CISA KEV, and EPSS puts 30-day exploitation probability at about 0.1 percent, so no exploitation is currently known.
What to do: Upgrade to the first GitPython release after 3.1.58 that addresses this issue once published (no fixed version in the source data), and confirm the fix passes merge_includes=False when Submodule._config_parser() builds its parser. Until then, avoid calling repo.submodules, Submodule.config(), or Submodule.iter_items() on repositories cloned from untrusted sources, or first inspect their .gitmodules for [include] directives referencing absolute, relative-with-traversal, or home-directory paths. Review logs for MissingSectionHeaderError messages, since these may have already leaked the first line of sensitive local files.
| GitPython project (pip ecosystem) GitPython | through 3.1.58 (vulnerable code confirmed at repo HEAD commit 9729ed3b948f2bde09f1f188c5311e172212b67e, 2026-08-05; no fixed release identified in source data; |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
GitPython before 3.1.59 fails to disable merge_includes when parsing .gitmodules, allowing attackers to disclose local file content by including arbitrary file paths via [include] directives. Attackers can craft a malicious .gitmodules file with include directives pointing to sensitive files; when repo.submodules is accessed, GitConfigParser raises MissingSectionHeaderError embedding the target file's first line verbatim in the exception message.
- Vendors
- gitpython project
- Products
- gitpython
- Ecosystems
- pip
- Weakness
- CWE-73
- Vector
- CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- GHSA
- GHSA-7833-fr7j-v32q (high)
In the news0 stories
No ingested article mentions this CVE yet.