# CVE-2026-42215: GitPython: Command injection via Git options bypass

- Severity: High 8.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.75%, higher than 56% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-04-25T23:42:16.000Z
- Modified: 2026-11-11T23:10:00.263Z
- Also known as: GHSA-rpm5-65cw-6hj4, PYSEC-2026-2160
- Weaknesses: CWE-78
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- gitpython-developers GitPython: >= 3.1.30, < 3.1.47
- gitpython (PyPI): from 3.1.30 before 3.1.47
- gitpython_project gitpython: from 3.1.30 before 3.1.47

## Every score

- GitHub_M: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-rpm5-65cw-6hj4> (exploit, evidence, vendor-advisory, web)
- <https://github.com/gitpython-developers/GitPython/releases/tag/3.1.47> (fix, patch, release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-42215> (advisory)
- <https://github.com/gitpython-developers/GitPython> (package)

## Sources

- CVE List: [CVE-2026-42215](https://www.cve.org/CVERecord?id=CVE-2026-42215), CVE Terms of Use, modified 2026-05-09
- GitHub Advisory Database: [GHSA-rpm5-65cw-6hj4](https://github.com/advisories/GHSA-rpm5-65cw-6hj4), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-42215](https://nvd.nist.gov/vuln/detail/CVE-2026-42215), Public domain, modified 2026-11-11
- PyPA Advisory Database: [PYSEC-2026-2160](https://osv.dev/vulnerability/PYSEC-2026-2160), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-42215 · Whole record: https://cve.day/CVE-2026-42215.json · Rebuilt by cve.day 2026-11-25T22:59:20.897Z
