CVE-2026-42215: GitPython · OS Command Injection
Affects GitPythonSource CVE Database V5
Not known to be exploited · CVSS 8.8 High : upgrade to 3.1.47 soon.
Data as of 30 Oct 2026, 11:52 UTC
- EPSS
- 0.7% chance of exploitation in 30 days – higher than 54% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 3.1.47
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 7 May 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 30 Oct 2026.
What to do
Upgrade GitPython and gitpython to 3.1.47.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| gitpython-developersGitPython | Affected
| Fixed in
|
PyPIgitpythonpkg:pypi/gitpythonOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
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.
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.