Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.7%top 49%

CVE-2026-42215: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in gitpython-developers GitPython

0
High
VulnerabilityCVE-2026-42215cvecve-2026-42215cwe-78
Published: 05/07/2026 (05/07/2026, 18:17:03 UTC)
Source: CVE Database V5
Vendor/Project: gitpython-developers
Product: GitPython

Description

GitPython versions from 3.1.30 up to but not including 3.1.47 contain an OS command injection vulnerability. This occurs because certain Python keyword arguments (upload_pack and receive_pack) bypass the library's default blocking of dangerous Git options, allowing attacker-controlled input to lead to arbitrary command execution. The issue is fixed in version 3.1.47. The vulnerability has a high severity with a CVSS score of 8.

CVSS v3.1

Score 8.8high

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected software

gitpython
pkg:pypi/gitpython
Affected versions
<3.1.47 >=3.1.30

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 05/15/2026, 10:49:41 UTC

Technical Analysis

GitPython is a Python library for interacting with Git repositories. Between versions 3.1.30 and before 3.1.47, the library blocks dangerous Git options like --upload-pack and --receive-pack by default. However, the equivalent Python keyword arguments upload_pack and receive_pack bypass this protection. If an application passes attacker-controlled values into Repo.clone_from(), Remote.fetch(), Remote.pull(), or Remote.push() via these kwargs, it can lead to arbitrary OS command execution even when allow_unsafe_options is set to False. This vulnerability is identified as CWE-78 (Improper Neutralization of Special Elements used in an OS Command). The issue has been patched in version 3.1.47.

Potential Impact

An attacker able to control the upload_pack or receive_pack keyword arguments in affected GitPython versions can execute arbitrary OS commands on the host system. This can lead to full compromise of confidentiality, integrity, and availability of the affected system. The CVSS 3.1 score is 8.8, indicating high severity with network attack vector, low attack complexity, requiring low privileges but no user interaction, and resulting in high impact on confidentiality, integrity, and availability.

Mitigation Recommendations

Upgrade GitPython to version 3.1.47 or later, where this vulnerability is patched. Until upgrading, avoid passing untrusted or attacker-controlled input into the upload_pack and receive_pack keyword arguments in Repo.clone_from(), Remote.fetch(), Remote.pull(), or Remote.push() methods. Patch status is confirmed by the vendor advisory stating the fix is included in version 3.1.47.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-04-25T05:04:37.028Z
Cvss Version
3.1
State
PUBLISHED
Remediation Level
null

Threat ID: 69fcdf2dcbff5d86101f12f1

Added to database: 05/07/2026, 18:51:25 UTC

Last enriched: 05/15/2026, 10:49:41 UTC

Last updated: 07/31/2026, 19:22:58 UTC

Views: 92

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses