Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malicious .gitmodules with [include] path to sensitive file
-
DeliveryDeliver via attacker-controlled repository or direct filesystem write
-
ExploitVictim application invokes repo.submodules on affected repository
-
ExecutionGitConfigParser follows include directive and reads target file
-
PersistMissingSectionHeaderError raised with first line of target file embedded
-
ImpactAttacker recovers disclosed content from exception logs or API error response
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V5 - File Handling File name/path control
|
| Exploitation Conditions | Two conditions must be simultaneously satisfied: (1) the attacker must be able to introduce a .gitmodules file containing a malicious [include] directive into a repository that is subsequently processed by the vulnerable GitPython instance - achievable by hosting an attacker-controlled repository for cloning, by contributing a malicious commit to a shared repository, or by having local write access to a repository on the target filesystem; and (2) the application must execute a code path that calls repo.submodules on the affected repository. A third environmental constraint applies: the target file referenced by the include directive must be readable by the OS user account under which GitPython is running - files exclusively readable by root are inaccessible if the application runs as an unprivileged service account. Each exploitation event discloses only the first line of the target file, meaning repeated invocations with different target paths would be required for broader reconnaissance. Exploitation does not require authenticated network access to the victim host when the malicious .gitmodules is delivered via a repository clone. |
| Impact | The CVSS 4.0 base score of 8.6 with AV:L/AC:L/AT:N/PR:N reflects that exploitation is locally scoped but requires no elevated privileges or special attack prerequisites. The provided VI:H and VA:H impact ratings in the vendor-supplied vector appear inconsistent with the described behavior, which confirms only the disclosure of the first line of a target file per triggered exception - this more precisely maps to high confidentiality impact with negligible integrity impact and limited availability disruption from uncaught exceptions propagating through calling code. No EPSS score was provided, and KEV status is absent, meaning no confirmed active exploitation exists at time of analysis. Real-world risk is most acute for automated GitPython-based pipelines (CI/CD systems, repository mirrors, code analysis tools) that process untrusted external repositories and whose exception traces are logged or returned in API responses - those represent the realistic exfiltration channel. The per-invocation limit of one disclosed line constrains bulk exfiltration but does not eliminate risk for high-value targets like token files or private keys whose secrets appear on the first line. |
| Exploit ScenarioDerived | An attacker publishes a malicious git repository whose .gitmodules contains an [include] directive pointing to /proc/self/environ or a known credential file path on Linux targets. A CI/CD pipeline using GitPython clones this repository and iterates repo.submodules to detect submodule changes. GitConfigParser follows the include directive, attempts to parse the target file as a Git config, and raises MissingSectionHeaderError embedding the file's first line - which may contain environment variables including API keys or tokens - in the exception text. If the pipeline logs stack traces to a centralized logging system accessible to the attacker, the content is recovered. No confirmed public POC is referenced in available intelligence. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 25, 2026
GitPython before 3.1.59 discloses local file content through exception messages when parsing .gitmodules files that contain [include] directives, because the library fails to disable the merge_includes feature in GitConfigParser. An attacker who can introduce a malicious .gitmodules into a repository processed by a vulnerable GitPython instance can cause the first line of any locally readable file to appear verbatim in a MissingSectionHeaderError exception when repo.submodules is accessed. No active exploitation has been confirmed (absent from CISA KEV) and no public POC is referenced in available intelligence; a vendor-released patch exists in version 3.1.59.
RemediationAI
Upgrade GitPython to version 3.1.59 or later, which disables merge_includes during .gitmodules parsing; the vendor advisory is at https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-7833-fr7j-v32q. If immediate upgrade is not feasible, the most effective compensating control is to avoid calling repo.submodules on any repository whose .gitmodules content is not fully trusted and controlled. Applications that ingest externally sourced repositories should pre-sanitize .gitmodules files by stripping or rejecting any [include] or [includeIf] stanzas before GitPython processes them - this removes the injection vector at the cost of blocking legitimate nested-include configurations if any are in use. Additionally, ensure GitConfigParser exception messages (MissingSectionHeaderError) are suppressed in application logs, API error responses, and monitoring pipelines to eliminate the exfiltration channel even if the parsing step is triggered; the trade-off is reduced debuggability for malformed config errors.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
GitPython (CPE: cpe:2.3:a:gitpython-developers:gitpython:*:*:*:*:*:*:*:*) is a Python library providing high-level abstractions over Git repositories. The root cause is CWE-73 (External Control of File Name or Path): Git's native config format supports [include] and [includeIf] directives that merge additional config files at parse time via the merge_includes mechanism. GitConfigParser, when reading .gitmodules to enumerate submodules, does not suppress this behavior. An attacker-supplied include path pointing to an arbitrary local file causes GitConfigParser to attempt to parse that file as a Git config. If the file lacks a valid section header (e.g., /etc/passwd, /etc/shadow, or application secrets), Python's configparser raises MissingSectionHeaderError whose exception message embeds the offending line verbatim - creating an inadvertent out-of-band exfiltration channel through exception output.
Know when Gitpython gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Local write access required to introduce malicious .gitmodules; user interaction needed to trigger submodules access; high confidentiality impact but no integrity impact and only limited availability disruption from propagating exceptions.
AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
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.
Blast Radius
ecosystem impact- 16 pypi packages depend on gitpython (13 direct, 3 indirect)
Ecosystem-wide dependent count for version 3.1.59.
Latest POC
1 public PoC link from github
Sign in to open the public PoC links collected for this CVE.
Executive ViewAI
GitPython versions before 3.1.59 can inadvertently disclose sensitive local file contents when processing repository configuration files, exposing confidential data through error messages. Organizations processing external or untrusted Git repositories face information disclosure risk, particularly in CI/CD and development environments where GitPython is commonly deployed.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Related Vulnerabilities in GitPython Argument Injection and File Read Flaws
View all 5All versions of package gitpython are vulnerable to Remote Code Execution (RCE) due to improper user input validation, w
GitPython is a python library used to interact with Git repositories. Rated high severity (CVSS 7.8), this vulnerability
GitPython is a python library used to interact with Git repositories. Rated medium severity (CVSS 6.5), this vulnerabili
GitPython before 3.1.32 does not block insecure non-multi options in clone and clone_from. Rated critical severity (CVSS
Command execution in GitPython 3.1.50 arises because its default unsafe-option gate fails to recognize joined short-opti
Command injection in GitPython before 3.1.51 allows low-privileged attackers to bypass the `check_unsafe_options` blockl
Command injection in GitPython 3.1.30-3.1.46 allows remote authenticated attackers to execute arbitrary commands via und
Command injection and arbitrary file overwrite in GitPython before 3.1.51 expose applications that pass attacker-control
Same weakness CWE-73 – External Control of File Name or Path
View allSame technique Information Disclosure
View allVendor StatusVendor
SUSE
Severity: Important| Product | Status |
|---|---|
| SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP7 | Affected |
| SUSE Linux Enterprise Server 15 SP7 | Affected |
| SUSE Linux Enterprise Desktop 15 SP7 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Affected |
| SUSE Linux Enterprise Server 15 SP4-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP4-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP6-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP6-LTSS | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | Affected |
| SUSE Linux Enterprise Desktop 15 SP7 | Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP7 | Affected |
| SUSE Linux Enterprise Server 15 SP7 | Affected |
| SUSE Linux Enterprise Server 16.0 | Affected |
| SUSE Linux Enterprise Server 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.0 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
| openSUSE Leap 16.0 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP4 | Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP5 | Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP6 | Affected |
| SUSE Linux Enterprise Server 15 SP4 | Affected |
| SUSE Linux Enterprise Server 15 SP4-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP5 | Affected |
| SUSE Linux Enterprise Server 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP6 | Affected |
| SUSE Linux Enterprise Server 15 SP6-LTSS | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | Affected |
| SUSE Linux Enterprise Desktop 15 SP4 | Affected |
| SUSE Linux Enterprise Desktop 15 SP5 | Affected |
| SUSE Linux Enterprise Desktop 15 SP6 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS | Affected |
| SUSE Manager Proxy 4.3 | Affected |
| SUSE Manager Retail Branch Server 4.3 | Affected |
| SUSE Manager Server 4.3 | Affected |
| openSUSE Leap 15.4 | Affected |
| openSUSE Leap 15.5 | Affected |
| openSUSE Leap 15.6 | Affected |
EUVD-2026-65221
GHSA-7833-fr7j-v32q
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB