CVE-2026-42215: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in gitpython-developers GitPython
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.
AI Analysis
Technical Summary
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.
CVE-2026-42215: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in gitpython-developers 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
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
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.
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 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.