CVE-2026-78675 in GitPythoninfo

Summary

by MITRE • 08/25/2026

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.

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 08/25/2026

The vulnerability identified in versions of GitPython prior to 3.1.59 represents a critical information disclosure flaw rooted in improper handling of configuration parsing directives within git submodule definitions. This issue specifically affects the library's processing of .gitmodules files, which are used to define subrepositories for a given project. The core technical failure lies in the behavior of the GitConfigParser when it encounters [include] directives embedded within these module configurations. Under normal operational circumstances, security best practices dictate that such include mechanisms should be disabled or strictly sandboxed during parsing to prevent unintended side effects. However, due to this oversight, the parser attempts to resolve and read arbitrary file paths specified in these include statements rather than ignoring them as potentially untrusted input data.

The exploitation vector for this vulnerability is particularly insidious because it leverages standard git operations that are often automated or triggered by legitimate user actions. An attacker can craft a malicious .gitmodules file containing an [include] directive that points to a sensitive local file on the target system, such as /etc/passwd, environment variable files, or private key stores. When a victim application accesses the repo.submodules property of a GitPython repository object, the underlying parser processes this configuration. Instead of safely skipping the include block, the parser attempts to open and read the specified path. If the file exists but lacks the expected git config section headers, the parser raises a MissingSectionHeaderError exception. Crucially, the error message generated by this exception contains the first line of the targeted local file verbatim. This mechanism effectively turns an application crash or logging event into a direct data exfiltration channel for sensitive information residing on the host system.

From a classification perspective, this vulnerability aligns with CWE-200: Exposure of Sensitive Information to an Unauthorized Actor and CWE-78: Improper Neutralization of Special Elements used in an OS Command (specifically regarding path traversal via configuration parsing). It also maps to ATT&CK technique T1530.001, Data from Local System Repositories, as it involves reading files stored locally through a software component that interacts with version control systems. The operational impact is severe for applications that process untrusted git repositories or allow users to clone and inspect submodules without rigorous input validation. Attackers can use this flaw to enumerate system configurations, steal credentials embedded in environment files, or gather intelligence about the server's directory structure by observing error logs or stack traces returned to the user interface.

Mitigation for this vulnerability requires an immediate upgrade of GitPython to version 3.1.59 or later, where the developers have implemented safeguards to disable merge_includes during the parsing of .gitmodules files. For environments where upgrading is not immediately feasible, defensive coding practices should be employed. Developers must avoid directly accessing repo.submodules on repositories sourced from untrusted origins without first sanitizing the underlying configuration files. Additionally, application logging configurations should be reviewed to ensure that exception messages containing raw file contents are not exposed in user-facing error pages or public logs. Implementing strict allow-lists for submodule sources and validating repository integrity before parsing can further reduce the attack surface associated with this class of vulnerability.

Responsible

VulnCheck

Reservation

08/25/2026

Disclosure

08/25/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Do you know our Splunk app?

Download it now for free!