CVE-2026-78675: GitPython before 3.1.59 Local File Content Disclosure via .gitmodules

Published Aug 25, 2026
·
Updated

GitPython before 3.1.59 fails to disable mergeincludes 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.

Affected Software

1 affected component
GitPython GitPython<3.1.59

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade gitpython to a version that resolves this vulnerability.

    Fixed in 3.1.59
  2. Configuration

    Ensure GitPython disables merge_includes when parsing .gitmodules (vulnerable in GitPython before 3.1.59 where it fails to disable merge_includes, allowing [include] directives to disclose local file contents).

    GitPython merge_includes = disabled

Event History

Aug 25, 2026
CVE Published
via MITRE·01:30 AM
Data Sourced
via MITRE·01:30 AM
DescriptionSeverityWeakness

Frequently Asked Questions

1

What must an attacker provide or cause the application to do to exploit this issue?

The attacker needs to supply a repository containing a malicious .gitmodules file with [include] directives that reference local sensitive-file paths. The application must then access repo.submodules, which triggers parsing of .gitmodules.

2

How is the disclosed content exposed to the application or user?

GitConfigParser raises a MissingSectionHeaderError during parsing, and the exception message embeds the first line of the referenced local file verbatim. Exposure therefore depends on where the application logs, displays, or otherwise returns that exception.

3

Which versions should be treated as affected?

GitPython versions before 3.1.59 are affected. Upgrading to 3.1.59 or later addresses the described behavior.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203