CVE-2026-42284
CRITICAL 9.8CVSS 3.1GitPython: Unsafe option check validates multi_options before shlex.split transformation
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.
- Published
- 7 May 2026
- Last modified
- 11 Nov 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-88
- Also known as
- GHSA-x2qx-6953-8485PYSEC-2026-2161
- Sources
- NVDJSONOSV GHSA-x2qx-6953-8485JSONOSV PYSEC-2026-2161JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | PyPA | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 8.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 8.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | gitpython_project | gitpythoncpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:python:*:* |
< 3.1.47 | 3.1.47 |
| OSV | PyPI | gitpython | < 3.1.47 | 3.1.47 |
References
- https://github.com/gitpython-developers/GitPython/releases/tag/3.1.47 · Patch, Release Notes, WEB, FIX
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-x2qx-6953-8485 · Exploit, Vendor Advisory, WEB, EVIDENCE
- https://www.tenable.com/cve/CVE-2026-32686 · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-42284 · ADVISORY
- https://github.com/gitpython-developers/GitPython · PACKAGE
History
- 25 Nov 2026 21:02 UTC · NVD: first stored (published 7 May 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 7 May 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 25 Apr 2026)