| Name | CVE-2026-42284 |
| 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. |
| Source | CVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
| References | DLA-4872-1, DSA-6594-1 |
| Debian Bugs | 1135350 |
The table below lists information on source packages.
| Source Package | Release | Version | Status |
|---|---|---|---|
| python-git (PTS) | bookworm | 3.1.30-1+deb12u2 | vulnerable |
| bookworm (security) | 3.1.30-1+deb12u3 | fixed | |
| trixie | 3.1.44-1 | vulnerable | |
| trixie (security) | 3.1.44-1+deb13u1 | fixed | |
| forky, sid | 3.2.1-1 | fixed |
The information below is based on the following data on fixed versions.
| Package | Type | Release | Fixed Version | Urgency | Origin | Debian Bugs |
|---|---|---|---|---|---|---|
| python-git | source | bookworm | 3.1.30-1+deb12u3 | DLA-4872-1 | ||
| python-git | source | trixie | 3.1.44-1+deb13u1 | DSA-6594-1 | ||
| python-git | source | (unstable) | 3.1.50-1 | 1135350 |
https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-x2qx-6953-8485
Fixed by: https://github.com/gitpython-developers/GitPython/pull/2130
Fixed by: https://github.com/gitpython-developers/GitPython/commit/c9a26789d88b18f8b4620f37307df2976292d2a0 (3.1.47)