Skip to main content

GitPython CVE-2026-78675

| EUVDEUVD-2026-65221 HIGH
External Control of File Name or Path (CWE-73)
2026-08-25 VulnCheck GHSA-7833-fr7j-v32q GHSA-crmc-f4m7-33fj PYSEC-2026-3785
8.6
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft malicious .gitmodules with [include] path to sensitive file
  2. Delivery
    Deliver via attacker-controlled repository or direct filesystem write
  3. Exploit
    Victim application invokes repo.submodules on affected repository
  4. Execution
    GitConfigParser follows include directive and reads target file
  5. Persist
    MissingSectionHeaderError raised with first line of target file embedded
  6. Impact
    Attacker 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
1 public PoC Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

GitPython 0 <3.1.59

Affected Packages

pypi gitpython fix: 3.1.59

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

Vendor (VulnCheck) PRIMARY 8.6 HIGH
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
vuln.today AI 6.1 MEDIUM

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.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:L
4.0 AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:N/VA:L/SC:N/SI:N/SA:N
SUSE 8.4 HIGH
AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Red Hat 5.5 MEDIUM

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Aug 25, 2026 - 03:16 EUVD
CVE Published
Aug 25, 2026 - 01:30 cve.org
HIGH 8.6

DescriptionCVE.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
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 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

Why It Matters

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.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.1%
Top 98% exploitable
Prevalence
Medium
widely used Python library for git repository automation
Threat Intel
1
1 sources
Data Quality
8 sources
Confidence: High
EUVD 🇯🇵JVN NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

63
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +43
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Vendor 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

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy