CVE-2026-42284
GitPython: GitPython: Arbitrary code execution via improper validation of clone options
Severity by source
Trivy's own label is CRITICAL. Rated critical by NVD. Rated lower by GHSA (high), Red Hat (high), Ubuntu (medium).
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.
Affected packages and fixed versions
| Source | Package | Fixed in |
|---|---|---|
| alpine 3.23 | py3-gitpython | 3.1.49-r0 |
| alpine 3.24 | py3-gitpython | 3.1.49-r0 |
| alpine edge | py3-gitpython | 3.1.49-r0 |
| chainguard | awx, checkov, datahub-ingestion-fips and 4 more | 24.6.1-r35 and 6 more |
| debian 11 | python-git | no fix listed |
| debian 12 | python-git | no fix listed |
| debian 13 | python-git | no fix listed |
| debian 14 | python-git | 3.1.50-1 |
| echo | python-git | 3.1.47 |
| echo pip::Echo OSV | gitpython | 3.1.47, 3.1.47 |
| minimos | mageai, py3-gitpython | 0.9.80-r0 and 1 more |
| pip::GitHub Security Advisory pip | gitpython | 3.1.47 |
Show all 37 entries from 22 sources
| Source | Package | Fixed in |
|---|---|---|
| alpine 3.23 | py3-gitpython | 3.1.49-r0 |
| alpine 3.24 | py3-gitpython | 3.1.49-r0 |
| alpine edge | py3-gitpython | 3.1.49-r0 |
| chainguard | awx | 24.6.1-r35 |
| chainguard | checkov | 3.2.525-r0 |
| chainguard | datahub-ingestion-fips | 1.5.0.1-r2 |
| chainguard | mlflow | 3.16.0-r0 |
| chainguard | mlflow-fips | 3.11.1-r0 |
| chainguard | opal | 0.9.5-r0 |
| chainguard | open-webui | 0.9.2-r0 |
| debian 11 | python-git | no fix listed |
| debian 12 | python-git | no fix listed |
| debian 13 | python-git | no fix listed |
| debian 14 | python-git | 3.1.50-1 |
| echo | python-git | 3.1.47 |
| echo pip::Echo OSV | gitpython | 3.1.47, 3.1.47 |
| minimos | mageai | 0.9.80-r0 |
| minimos | py3-gitpython | 3.1.47-r0 |
| pip::GitHub Security Advisory pip | gitpython | 3.1.47 |
| rapidfort debian 12 | python-git | 0:3.1.50-1 |
| rapidfort debian 13 | python-git | 0:3.1.50-1 |
| Red Hat | python-gitpython | no fix listed |
| Red Hat | python3.12-gitpython | no fix listed |
| Red Hat | satellite-capsule:el8::python-gitpython | no fix listed |
| Red Hat | satellite/iop-vmaas-rhel9 | no fix listed |
| Red Hat | satellite/iop-vulnerability-engine-rhel9 | no fix listed |
| Red Hat | satellite:el8::python-gitpython | no fix listed |
| seal pip::Seal Security Database | gitpython | 3.1.37+sp999 |
| seal pip::Seal Security Database | seal-gitpython | 3.1.37+sp999 |
| ubuntu 20.04-ESM | python-git | 3.0.7-1ubuntu0.1~esm4 |
| ubuntu 22.04 | python-git | no fix listed |
| ubuntu 24.04 | python-git | no fix listed |
| ubuntu 26.04 | python-git | no fix listed |
| ubuntu 26.10 | python-git | no fix listed |
| wolfi | checkov | 3.2.525-r0 |
| wolfi | mlflow | 3.16.0-r0 |
| wolfi | open-webui | 0.9.2-r0 |
References
- https://access.redhat.com/security/cve/CVE-2026-42284
- https://advisory.echohq.com/cve/CVE-2026-42284
- https://github.com/advisories/GHSA-x2qx-6953-8485
- https://github.com/gitpython-developers/GitPython
- https://github.com/gitpython-developers/GitPython/releases/tag/3.1.47
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-x2qx-6953-8485
- https://nvd.nist.gov/vuln/detail/CVE-2026-42284
- https://ubuntu.com/security/notices/USN-8303-1