# CVE-2026-42284: GitPython: Unsafe option check validates multi_options before shlex.split transforms it

- Severity: High 8.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/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.57%, higher than 48% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2026-04-25T23:41:49.000Z
- Modified: 2026-11-11T23:10:00.263Z
- Also known as: GHSA-x2qx-6953-8485, PYSEC-2026-2161
- Weaknesses: CWE-88
- 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. Prior to version 3.1.47, _clone() validates multi_options as the original list, then executes shlex.split(" ".join(multi_options)). A string like "--branch main --config core.hooksPath=/x" passes validation (starts with --branch), but after split becomes ["--branch", "main", "--config", "core.hooksPath=/x"]. Git applies the config and executes attacker hooks during clone. This issue has been patched in version 3.1.47.

(As written by CVE List.)

## Affected

- gitpython-developers GitPython: < 3.1.47
- gitpython (PyPI): before 3.1.47
- gitpython_project gitpython: before 3.1.47

## Every score

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

## References

- <https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-x2qx-6953-8485> (exploit, evidence, vendor-advisory, web)
- <https://www.tenable.com/cve/CVE-2026-32686> (exploit, 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-42284> (advisory)
- <https://github.com/gitpython-developers/GitPython> (package)

## Sources

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

---

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