Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconIdentify target with user-controlled clone options
-
DeliverySend crafted multi_options with embedded --config
-
ExploitGitPython validates pre-split string
-
Installshlex.split creates separate --config token
-
C2Git applies malicious core.hooksPath config
-
ExecuteGit executes attacker hooks during clone
-
ImpactArbitrary code execution in application context
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Argument sanitization
|
| Exploitation Conditions | Exploitation requires the target application to call GitPython's Repo.clone_from() or Submodule.update() methods with the multi_options or clone_multi_options parameter derived from attacker-controlled input. This typically occurs in repository management platforms, CI/CD systems, documentation generators, or Git hosting services that allow users to specify custom clone options or repository configurations. The vulnerability is NOT exploitable against applications that hardcode multi_options or sanitize input to reject strings containing whitespace or special characters. Network access (AV:N) means the attacker can trigger the vulnerability remotely via HTTP API, web form, or service interface without local system access. High attack complexity (AC:H) reflects the requirement to control specific function parameters - not all GitPython usage is vulnerable, only code paths that accept external multi_options. No authentication (PR:N) or user interaction (UI:N) is required once the vulnerable code path is reached, making automated exploitation feasible against exposed endpoints. The attack succeeds on default GitPython configurations without requiring non-standard features or settings. |
| Impact | Real-world risk is moderate-to-high for applications that pass untrusted input to GitPython's clone operations. CVSS 8.1 (AV:N/AC:H/PR:N/UI:N) indicates network-exploitable without authentication but with high attack complexity - the attacker must control multi_options arguments passed to Repo.clone_from() or Submodule.update(), which typically requires the application to accept user-supplied repository URLs or clone options. Public exploit code exists (GitHub advisory GHSA-x2qx-6953-8485 includes working PoC), lowering the barrier for exploitation. However, EPSS score and KEV status are not available at time of analysis, suggesting no confirmed widespread or automated exploitation campaigns. The scope is unchanged (S:U), meaning impact is limited to the GitPython process context, but full confidentiality/integrity/availability compromise is possible via arbitrary code execution through malicious hooks. Priority depends on whether your application exposes multi_options to external input - most defensive uses of GitPython with hardcoded clone parameters are not vulnerable. Organizations using GitPython in web APIs, CI/CD pipelines, or repository management platforms with user-supplied clone options should prioritize remediation immediately. |
| Exploit ScenarioDerived | An attacker identifies a web application that clones Git repositories based on user-supplied URLs and clone options (e.g., a CI/CD platform, documentation builder, or code review tool). The attacker crafts a malicious multi_options parameter: ['--branch main --config core.hooksPath=/tmp/evil']. The application passes this to GitPython's Repo.clone_from(), which validates the string as starting with '--branch' and allows it. After shlex.split, Git receives '--config core.hooksPath=/tmp/evil' as a separate argument, configures the hooks path, and executes the attacker's post-checkout hook during clone, achieving remote code execution in the application server context with full access to confidential data, integrity modification capabilities, and potential lateral movement to infrastructure. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 07, 2026
Remote code execution in GitPython < 3.1.47 allows unauthenticated network attackers to inject malicious Git configuration during repository clone operations via crafted multi_options arguments. The _clone() method validates options before shlex.split transformation, enabling attackers to bypass unsafe option checks by embedding commands like '--config core.hooksPath=/attacker/path' within '--branch' strings. Git then executes attacker-controlled hooks during clone. Vendor-released patch available in version 3.1.47. CVSS 8.1 with high attack complexity; no EPSS or KEV data available, but public exploit code exists per GitHub security advisory GHSA-x2qx-6953-8485.
RemediationAI
Upgrade GitPython to version 3.1.47 or later immediately (pip install --upgrade GitPython==3.1.47). This version fixes the validation logic to check options after shlex.split transformation. Release notes confirm the patch at https://github.com/gitpython-developers/GitPython/releases/tag/3.1.47. If immediate upgrade is not possible, implement strict input validation to reject any multi_options strings containing whitespace or shell metacharacters - however, this workaround is complex due to legitimate use cases for quoted arguments, so upgrading is strongly preferred. Do not accept multi_options or clone_multi_options values from untrusted sources; if repository clone configuration must be user-configurable, use an allowlist of specific options (e.g., only permit '--branch <value>' with value validated against a known branch list). Note that blocking --config alone is insufficient due to other potentially dangerous options like --upload-pack. For defense-in-depth, run GitPython operations in sandboxed environments with no write access to system directories and with disabled hooks execution via Git's core.hooksPath set to /dev/null, though this mitigation may break legitimate hook-dependent workflows.
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 interaction with Git repositories (cpe:2.3:a:gitpython-developers:gitpython). The vulnerability stems from CWE-88 (Improper Neutralization of Argument Delimiters) in the _clone() function at git/repo/base.py. The code path performs security validation on the original multi_options list, then transforms it via shlex.split(" ".join(multi_options)), and finally passes the transformed result to git clone. The validation uses startswith() checks against unsafe_git_clone_options, which cannot detect dangerous options embedded within quoted strings. For example, '--branch main --config core.hooksPath=/x' passes validation as a single string starting with '--branch', but shlex.split converts it to separate tokens ['--branch', 'main', '--config', 'core.hooksPath=/x'], allowing the --config directive to reach Git's command line. Git then applies the configuration and executes hooks from the attacker-controlled path during clone operations. The same logic flaw affects Submodule.update() via clone_multi_options parameter.
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
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Primary rating from GitHub Advisory.
CVSS VectorGitHub Advisory
Lifecycle Timeline
2DescriptionGitHub Advisory
GitPython is a python library used to interact with Git repositories. Prior to version 3.1.47, _clone() validates multi_options as the original list, then executes shlex.split(" ".join(multi_options)). A string like "--branch main --config core.hooksPath=/x" passes validation (starts with --branch), but after split becomes ["--branch", "main", "--config", "core.hooksPath=/x"]. Git applies the config and executes attacker hooks during clone. This issue has been patched in version 3.1.47.
Executive ViewAI
GitPython versions before 3.1.47 contain a remote code execution vulnerability allowing unauthenticated attackers to execute arbitrary commands on systems performing Git repository clones. Any application using GitPython to clone repositories-including CI/CD pipelines, deployment automation, and dependency management tools-can be compromised without user interaction, enabling attackers to inject malicious code into the development pipeline or deployed applications.
Vendor-released patch: GitPython 3.1.47. Until patched, implement network-level restrictions limiting Git clone operations to trusted repository sources only; disable automated repository cloning from untrusted origins; isolate affected systems from production environments; monitor Git clone operations for embedded configuration injection patterns.
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.
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 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
GitPython before 3.1.32 does not block insecure non-multi options in clone and clone_from. Rated critical severity (CVSS
Same technique Information Disclosure
View allVendor StatusVendor
SUSE
Severity: High| 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 High Performance Computing 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 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP7 | Fixed |
| SUSE Linux Enterprise Module for Python 3 15 SP7 | Fixed |
| SUSE Linux Enterprise Server 15 SP7 | Fixed |
| SUSE Linux Enterprise Server 16.0 | Fixed |
| SUSE Linux Enterprise Server 16.1 | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Fixed |
| SUSE Linux Enterprise Server for SAP applications 16.0 | Fixed |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP4 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP5 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | Fixed |
| SUSE Linux Enterprise Module for Python 3 15 SP4 | Fixed |
| SUSE Linux Enterprise Module for Python 3 15 SP5 | Fixed |
| SUSE Linux Enterprise Module for Python 3 15 SP6 | Fixed |
| SUSE Linux Enterprise Server 15 SP4 | Fixed |
| SUSE Linux Enterprise Server 15 SP4-LTSS | Fixed |
| SUSE Linux Enterprise Server 15 SP5 | Fixed |
| SUSE Linux Enterprise Server 15 SP5-LTSS | Fixed |
| SUSE Linux Enterprise Server 15 SP6 | Fixed |
| SUSE Linux Enterprise Server 15 SP6-LTSS | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | Fixed |
| SUSE Manager Proxy 4.3 | Fixed |
| SUSE Manager Retail Branch Server 4.3 | Fixed |
| SUSE Manager Server 4.3 | Fixed |
| SUSE Linux Enterprise Desktop 15 SP4 | Fixed |
| SUSE Linux Enterprise Desktop 15 SP5 | Fixed |
| SUSE Linux Enterprise Desktop 15 SP6 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP6 | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | Fixed |
| openSUSE Leap 15.4 | Fixed |
| openSUSE Leap 15.5 | Fixed |
| openSUSE Leap 15.6 | Fixed |
EUVD-2026-28412
GHSA-x2qx-6953-8485
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB