CVE-2026-78675

GitPython before 3.1.59 Local File Content Disclosure via .gitmodules

Published Aug 25, 2026 CVSS 4.0 · 8.6 High EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

The vulnerability exists in GitPython versions before 3.1.59, where the parser for .gitmodules does not disable merge_includes. An attacker can craft a malicious .gitmodules file with [include] directives pointing to arbitrary local files. When the application accesses repo.submodules, the GitConfigParser raises a MissingSectionHeaderError, and the exception message embeds the first line of the target file verbatim. This behavior allows the attacker to read sensitive files from the file system, resulting in information disclosure. The weakness is identified as CWE-73.

Affected Systems

Affected vendors and products include the gitpython-developers’ GitPython library. All releases older than 3.1.59 are vulnerable. No additional version details are provided beyond the pre-3.1.59 range. Any user who employs the GitPython package and accesses submodule information should verify they are running a safe version.

Risk and Exploitability

The CVSS score of 8.6 indicates high severity, but the EPSS score is unavailable and the vulnerability is not listed in CISA KEV, suggesting no known widespread exploitation yet. The attack vector requires the attacker to supply a malicious .gitmodules file, which could be introduced remotely if the repository accepts arbitrary uploads or via a pull request, or locally if the attacker can write files to the repository. The exception message exposure shows the vulnerability can be exploited to reveal content without needing higher privileges than the process that runs GitPython. Consequently, the risk remains significant until patched.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade GitPython to version 3.1.59 or newer.
  • If an upgrade is not immediately possible, restrict or sanitize .gitmodules files so that any [include] directives are removed or disabled before parsing, ensuring merge_includes is set to False.
  • Configure logging to detect and alert on MissingSectionHeaderError exceptions that expose file content, and review any such incidents for potential data leakage.

Generated by OpenCVE AI on August 25, 2026 at 03:39 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4872-1 python-git security update
Github GHSA Github GHSA GHSA-7833-fr7j-v32q GitPython: Arbitrary local file content disclosure via [include] directive in untrusted .gitmodules (SubmoduleConfigParser never disables merge_includes)
History
Type Values Removed Values Added
CPEs cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:python:*:*
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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.
Title GitPython before 3.1.59 Local File Content Disclosure via .gitmodules
First Time appeared Gitpython Project
Gitpython Project gitpython
Weaknesses CWE-73
CPEs cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:*:*:*
Vendors & Products Gitpython Project
Gitpython Project gitpython
References
Metrics cvssV3_1

{'score': 8.4, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 8.6, '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'}

Weaknesses
  • CWE-73

    External Control of File Name or Path

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Oct 8, 2026, 3:25 PM
Reserved
Aug 25, 2026, 1:17 AM
Status
Analyzed
Published
Aug 25, 2026, 2:16 AM
Modified
Oct 12, 2026, 3:10 PM
Severity
Moderate
Public date
Aug 25, 2026, 1:30 AM