Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to target application
-
DeliverySubmit crafted kwargs with underscore-formatted Git options (upload_pack=/path/to/payload)
-
ExploitApplication passes kwargs to GitPython remote operation
-
ExecutionGitPython validation bypass (underscore normalization)
-
PersistGit executes attacker-specified helper command
-
ImpactArbitrary code execution in application context
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK
2 techniques across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Applications must accept attacker-controlled input into kwargs dictionaries passed to GitPython's Repo.clone_from(), Remote.fetch(), Remote.pull(), or Remote.push() methods. Vulnerable code pattern: repo.remote('origin').fetch(**user_supplied_dict) or similar constructions where dictionary keys/values originate from untrusted sources (HTTP parameters, API inputs, configuration files writable by lower-privileged users). Attack requires authenticated access (PR:L in CVSS vector) to the application layer invoking GitPython, but does not require local system access or privileged Git repository permissions. Does NOT require allow_unsafe_options=True since the bypass defeats the default False protection. Limits exploitation: applications that hard-code all GitPython kwargs without external input are not vulnerable; applications performing strict kwarg key whitelisting before GitPython invocation prevent the bypass; Python environments without shell command execution capabilities (highly restricted sandboxes) limit impact but do not prevent injection attempts. |
| Impact | CVSS 8.8 (AV:N/AC:L/PR:L/UI:N) indicates network-exploitable command injection requiring authenticated access with no user interaction and high impact across confidentiality, integrity, and availability. Real-world risk depends heavily on application architecture: only affects applications that (1) accept untrusted input into GitPython API kwargs and (2) expose git remote operations to authenticated users. The PR:L requirement significantly reduces attack surface compared to unauthenticated RCE. No CISA KEV listing or EPSS data suggests exploitation remains limited to security research contexts rather than active campaigns. Publicly available exploit code exists (GitHub advisory GHSA-rpm5-65cw-6hj4 with technical details and POC paths). Patch availability in version 3.1.47 since the advisory release enables straightforward remediation. Priority is HIGH for applications exposing GitPython remote operations with user-controlled parameters, MEDIUM for applications using GitPython with authenticated-only access to kwargs, LOW for applications that hard-code all GitPython parameters without external input. |
| Exploit ScenarioDerived | An authenticated attacker with access to a Python application using GitPython identifies a code path where user input controls kwargs passed to remote.fetch(). The attacker crafts a request setting upload_pack='/usr/bin/malicious-script' which bypasses GitPython's unsafe option check due to underscore formatting. When the application executes remote.fetch(upload_pack=attacker_value), Git invokes the attacker's script during the fetch operation, achieving arbitrary command execution in the application's context. GitHub advisory GHSA-rpm5-65cw-6hj4 provides proof-of-concept demonstrating the bypass mechanism. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 07, 2026
Command injection in GitPython 3.1.30-3.1.46 allows remote authenticated attackers to execute arbitrary commands via underscore-formatted kwargs that bypass unsafe option validation. Applications passing attacker-controlled kwargs to Repo.clone_from(), Remote.fetch(), Remote.pull(), or Remote.push() are vulnerable even when allow_unsafe_options=False (default). GitHub-confirmed exploit with vendor-released patch 3.1.47. CVSS 8.8 reflects network vector with low complexity and authenticated access; no EPSS/KEV data indicates exploitation not yet widespread beyond proof-of-concept demonstration.
RemediationAI
Upgrade GitPython to version 3.1.47 or later via pip install --upgrade GitPython==3.1.47 per release notes at https://github.com/gitpython-developers/GitPython/releases/tag/3.1.47. If immediate upgrade is not feasible, implement strict input validation by whitelisting allowed kwargs before passing to Repo.clone_from(), Remote.fetch(), Remote.pull(), or Remote.push() functions-specifically reject any kwargs containing underscore-formatted Git option names (upload_pack, receive_pack, exec). Alternatively, avoid passing user-controlled dictionaries directly as **kwargs; instead construct kwargs from hardcoded safe parameters only. Note that setting allow_unsafe_options=False (default) does NOT prevent this bypass. Defense-in-depth: run GitPython operations in sandboxed environments with restricted shell access and apply principle of least privilege to service accounts executing git commands, though these mitigations only reduce impact post-exploitation rather than preventing command injection itself. Vendor advisory at https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-rpm5-65cw-6hj4 provides additional technical context.
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. The vulnerability (CWE-78 OS Command Injection) stems from a validation bypass in Git.check_unsafe_options() at git/cmd.py:948-961. GitPython blocks dangerous Git options like --upload-pack and --receive-pack by checking raw kwargs keys before normalization, but Git.transform_kwarg() at git/cmd.py:1471-1484 subsequently converts Python-style underscore kwargs (upload_pack, receive_pack) into dashed command-line flags (--upload-pack, --receive-pack). Because validation runs before this dashification step, underscore-form kwargs bypass the safety check entirely, allowing attacker-supplied helper commands to execute via git clone/fetch/pull/push operations. The CPE cpe:2.3:a:gitpython-developers:gitpython applies to pip package GitPython versions 3.1.30 through 3.1.46.
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:L/PR:L/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. From version 3.1.30 to before version 3.1.47, GitPython blocks dangerous Git options such as --upload-pack and --receive-pack by default, but the equivalent Python kwargs upload_pack and receive_pack bypass that check. If an application passes attacker-controlled kwargs into Repo.clone_from(), Remote.fetch(), Remote.pull(), or Remote.push(), this leads to arbitrary command execution even when allow_unsafe_options is left at its default value of False. This issue has been patched in version 3.1.47.
Blast Radius
ecosystem impact- 53 pypi packages depend on gitpython (53 direct, 0 indirect)
Ecosystem-wide dependent count for version 3.1.30.
Executive ViewAI
GitPython versions 3.1.30 through 3.1.46 contain a command injection vulnerability allowing authenticated attackers to execute arbitrary commands through improperly validated function arguments, affecting any application using Repo.clone_from(), Remote.fetch(), Remote.pull(), or Remote.push() operations. Organizations deploying GitPython in CI/CD pipelines, repository management tools, or development automation should prioritize assessment and remediation to prevent supply chain compromise and unauthorized code execution.
Vendor-released patch: GitPython 3.1.47. Apply immediately. Interim mitigation if immediate patching unavailable: restrict network access to Git remote repositories to trusted sources only; disable or sandbox applications accepting user input for Git operations; implement WAF/proxy rules to block suspicious Git command syntax in application logs.
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
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
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 weakness CWE-78 – OS Command Injection
View allSame technique Command Injection
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-28411
GHSA-rpm5-65cw-6hj4
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB