Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessClone or process attacker-controlled repository via GitPython
-
DeliveryMalicious submodule name written verbatim into .git/config section header
-
ExploitBracket characters close intended header and inject core.sshCommand directive
-
ExecutionVictim performs git SSH remote operation
-
ImpactGit 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 |
| 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 |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
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 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
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
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.
AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.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- 1 pypi packages depend on gitpython (1 direct, 0 indirect)
Ecosystem-wide dependent count for version 3.1.53.
Executive ViewAI
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.
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
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
All versions of package gitpython are vulnerable to Remote Code Execution (RCE) due to improper user input validation, w
Arbitrary code execution in GitPython before 3.1.59 arises from unsafe re-serialization of multi-line, quoted git-config
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
Arbitrary directory creation and potential hook-based code execution in GitPython affects all releases before 3.1.59. Th
Environment variable exfiltration in GitPython before 3.1.52 allows any attacker who controls a URL passed to `Repo.clon
GitPython before 3.1.59 discloses local file content through exception messages when parsing .gitmodules files that cont
GitPython is a python library used to interact with Git repositories. Rated high severity (CVSS 7.8), this vulnerability
Arbitrary file read in GitPython before 3.1.59 allows low-privileged remote attackers to exfiltrate sensitive files by s
Arbitrary file read in GitPython versions before 3.1.59 exposes sensitive filesystem content to low-privileged network a
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 |
| 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 | 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 SP6 | Affected |
| SUSE Manager Proxy 4.3 | Affected |
| SUSE Manager Retail Branch Server 4.3 | Affected |
| SUSE Manager Server 4.3 | 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-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP6 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | Affected |
| openSUSE Leap 15.4 | Affected |
| openSUSE Leap 15.5 | Affected |
| openSUSE Leap 15.6 | Affected |
EUVD-2026-52290
GHSA-9xx9-hw38-h2w9
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB