Vulnerability record · CVE-2026-42215 · published 7 May 2026
CVE-2026-42215: Gitpython project gitpython os command injection vulnerability
Gitpython Project · Gitpython
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.
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.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Affected products
1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.
References
| Link | Tags |
|---|---|
| https://github.com/gitpython-developers/GitPython/releases/tag/3.1.47 | PatchRelease Notes |
| https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-rpm5-65cw-6hj4 | ExploitVendor Advisory |
| https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-rpm5-65cw-6hj4 | ExploitVendor Advisory |
Track CVE-2026-42215 inside VULONE
Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.
Related vulnerabilities
Same products first, then exploited flaws of the same weakness class.
Source: NIST National Vulnerability Database (record CVE-2026-42215), CISA KEV, FIRST EPSS (scores of 2026-09-27). This page is refreshed as NVD updates the record.