Skip to main content

GitPython CVE-2026-42215

| EUVDEUVD-2026-28411 HIGH
OS Command Injection (CWE-78)
2026-05-07 GitHub_M GHSA-rpm5-65cw-6hj4
8.8
CVSS 3.1 · GitHub Advisory
Share

Severity by source

GitHub Advisory PRIMARY
8.8 HIGH
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
SUSE
HIGH
qualitative
Red Hat
7.5 HIGH
qualitative

Primary rating from GitHub Advisory.

CVSS VectorGitHub Advisory

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

4
Patch available
May 07, 2026 - 20:02 EUVD
Source Code Evidence Fetched
May 07, 2026 - 19:47 vuln.today
Analysis Generated
May 07, 2026 - 19:47 vuln.today
CVE Published
May 07, 2026 - 18:17 nvd
HIGH 8.8

Blast Radius

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

Ecosystem-wide dependent count for version 3.1.30.

DescriptionGitHub 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.

AnalysisAI

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.

Technical ContextAI

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.

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.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

Vendor 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

Share

CVE-2026-42215 vulnerability details – vuln.today

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