cbcvebase.
CVE-2026-42215
published 2026-05-07

CVE-2026-42215: 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…

PriorityP261high8.8CVSS 3.1
AVNACLPRLUINSUCHIHAH
EPSS
0.72%
49.2th percentile
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.

Affected

5 ranges
VendorProductVersion rangeFixed in
gitpython-developersgitpython
gitpython_projectgitpython>= 0 < 3.1.503.1.50
gitpython_projectgitpython>= 3.1.30 < 3.1.473.1.47
gitpython_projectgitpython>= 3.1.30 < 3.1.473.1.47
ubuntupython-git

Detection & IOCsextracted from sources · hover to see the quote

  • Monitor for use of Python kwargs `upload_pack` or `receive_pack` passed into GitPython methods (Repo.clone_from(), Remote.fetch(), Remote.pull(), Remote.push()) as these bypass the allow_unsafe_options=False default check
  • Flag GitPython versions 3.1.30 through 3.1.46 (inclusive) as vulnerable; enforce upgrade to 3.1.47 or later
  • ·The dangerous Git options `--upload-pack` and `--receive-pack` are blocked by default, but their Python kwarg equivalents (`upload_pack`, `receive_pack`) are NOT blocked — the bypass works regardless of the `allow_unsafe_options` setting
  • ·The vulnerability is only exploitable when an application passes attacker-controlled kwargs into the affected GitPython methods; applications that do not expose kwargs to user input are not directly at risk

CVSS provenance

nvdv3.18.8HIGHCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
ghsa8.8HIGH
vendor_ubuntu6.5MEDIUM
Stop checking back — get the weekly exploitation signal.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.