Skip to main content
VulnerabilityPublished Updated

CVE-2026-42215: GitPython · OS Command Injection

Affects GitPythonSource CVE Database V5

0
Compare

Not known to be exploited · CVSS 8.8 High : upgrade to 3.1.47 soon.

Data as of 30 Oct 2026, 11:52 UTC

CVSS 3.1 base score
8.8High
How severe the flaw is on the 0–10 CVSS scale.
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:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 7 May 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
gitpython-developersGitPythonAffected
  • >=3.1.30 <3.1.47
Fixed in
  • 3.1.47
PyPIgitpythonpkg:pypi/gitpythonOther threatsAffected
  • <3.1.47 >=3.1.30
Fixed in
  • 3.1.47

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.

References

Community reviews

Loading reviews…