# CVE-2026-78675: GitPython arbitrary local file content disclosure via .gitmodules [include]

Source: https://junglewise.ai/threats/cve-2026-78675-gitpython-arbitrary-local-file-content-disclosure-via-gitmodules  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-25. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-78675 · Severity: high · CVSS 8.4 · Published 2026-08-25

GitPython is a widely-used library for programmatic Git repository access, commonly integrated into CI/CD systems, code-review bots, and dependency scanners that process third-party repositories. A defect in how GitPython parses repository submodule configuration (.gitmodules) allows an attacker to disclose the first line of any file readable by the application—such as environment variables, API keys, or /etc/passwd—by embedding a path directive in a malicious repository. The victim need only perform the most routine read-only operation: listing the repository's submodules. This affects any application that processes untrusted repositories.

Technologies: [Gitpython Project Gitpython](https://junglewise.ai/threats/technologies/gitpython), [gitpython (PyPI)](https://junglewise.ai/threats/technologies/pypi-gitpython). Vendors: [Gitpython Project](https://junglewise.ai/threats/vendors/gitpython-project), [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-78675 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-78675 being exploited in the wild.

**How severe is CVE-2026-78675?** High severity, with a CVSS score of 8.4, published 25 August 2026.

**Which products and versions are affected?** gitpython (PyPI) ECOSYSTEM:introduced=0,fixed=3.1.59.

**Is there a fix for CVE-2026-78675?** Yes. gitpython (PyPI): upgrade to 3.1.59 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-78675 attacked?** It is attacked over the network or with local access, in a software library.

**Am I affected by CVE-2026-78675?** Check whether you run Gitpython Project Gitpython or gitpython (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- gitpython (PyPI): upgrade to 3.1.59 or later

  ```sh
  pip install "gitpython>=3.1.59"
  ```


## Technical details

GitPython's SubmoduleConfigParser parses .gitmodules (tracked, attacker-controlled repository content) without disabling the merge_includes feature that causes the ConfigParser to follow [include] directives to arbitrary filesystem paths. When an include path points to a non-gitconfig file (e.g., /etc/passwd, .env), the parser raises configparser.MissingSectionHeaderError with the target file's first line embedded verbatim in the exception message. Because Submodule.iter_items() catches only IOError and BadName (not configparser.Error), this exception propagates uncaught through the public repo.submodules API. Include-path resolution uses osp.isabs() to bypass path containment checks entirely for absolute paths and performs no repository-boundary verification. A sibling code path in Repo.config_writer() was hardened with merge_includes=False in 2023, but Submodule._config_parser() was never updated. The vulnerability requires only cloning an attacker repository and iterating repo.submodules—no authentication, submodule checkout, or user interaction.

## Affected products

- GitPython developers GitPython 3.1.58 and earlier

## Identifiers

- CVE-2026-78675
- GHSA-7833-fr7j-v32q
- PYSEC-2026-3785

## Timeline

- 2026-08-05: disclosed: Vulnerability present in GitPython HEAD (commit 9729ed3b948f2bde09f1f188c5311e172212b67e, version 3.1.58)
- 2026-08-10: advisory: GHSA-7833-fr7j-v32q published on GitHub Advisory Database
- 2026: patched: Fixed in GitPython 3.1.59
- 2026-09-08: other: CVE-2026-78675 assigned; advisory updated September 8, 2026

## References

- [https://api.github.com/users/Pig-Tail](https://api.github.com/users/Pig-Tail)
- [https://github.com/Pig-Tail](https://github.com/Pig-Tail)
- [https://api.github.com/users/Pig-Tail/gists%7B/gist_id%7D](https://api.github.com/users/Pig-Tail/gists%7B/gist_id%7D)
- [https://api.github.com/users/Pig-Tail/repos](https://api.github.com/users/Pig-Tail/repos)
- [https://avatars.githubusercontent.com/u/15832659?v=4](https://avatars.githubusercontent.com/u/15832659?v=4)
- [https://api.github.com/users/Pig-Tail/events%7B/privacy%7D](https://api.github.com/users/Pig-Tail/events%7B/privacy%7D)

## Related threats

- [GitPython command wrappers omit unsafe protocol and option checks](https://junglewise.ai/threats/cve-2026-110857-gitpython-command-wrappers-omit-unsafe-protocol-and-option)
- [GitPython submodule path traversal to arbitrary hook execution](https://junglewise.ai/threats/cve-2026-114145-gitpython-is-a-python-library-used-to-interact-with-git)
- [GitPython symlink following in Submodule.move()](https://junglewise.ai/threats/cve-2026-110860-gitpython-from-3-1-62-before-3-2-0-contains-a-symlink-following)
- [GitPython argument injection in Head.checkout()](https://junglewise.ai/threats/cve-2026-110859-gitpython-before-3-2-0-contains-an-argument-injection)
- [GitPython remote code execution in Remote.pull() refspec argument](https://junglewise.ai/threats/cve-2026-110858-gitpython-from-3-1-30-before-3-2-0-contains-a-remote-code)
