CVE-2026-42215 Details
Description
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.
A command injection vulnerability has been identified in GitPython versions 3.1.30 prior to 3.1.47. The library, which facilitates interaction with Git repositories, normally blocks hazardous Git options like '--upload-pack' and '--receive-pack'. However, the equivalent Python keyword arguments 'upload_pack' and 'receive_pack' can bypass this restriction. When an application introduces attacker-controlled keyword arguments into 'Repo.clone_from()', 'Remote.fetch()', 'Remote.pull()', or 'Remote.push()', it can result in arbitrary command execution, even with the 'allow_unsafe_options' setting at its default of False.
Users should upgrade to GitPython version 3.1.47 or later, where this vulnerability has been patched.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed May 8, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-rpm5-65cw-6hj4 | CISA-ADP | ExploitVendor Advisory |
| https://github.com/gitpython-developers/GitPython/releases/tag/3.1.47 | [email protected] | PatchRelease Notes |
| https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-rpm5-65cw-6hj4 | [email protected] | ExploitVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| gitpython project gitpython | >= 3.1.30, < 3.1.47 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| May 11, 2026 | Initial Analysis | [email protected] |
| May 8, 2026 | CVE Modified | CISA-ADP |
| May 7, 2026 | New CVE Received | [email protected] |