CVE-2026-42215
GitPython: Command injection via Git options bypass
Reported by github_m · Published May 7, 2026
GitPython is fixed in 3.1.47 (PyPI)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| GitPython | PyPI | 3.1.47 |
| checkov | Chainguard | 3.2.525-r0 |
| datahub-ingestion-fips | Chainguard | 1.5.0.1-r2 |
| open-webui | Wolfi | 0.9.2-r0 |
| opal | Chainguard | 0.9.5-r0 |
| checkov | Wolfi | 3.2.525-r0 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| gitpython-developers | GitPython | >= 3.1.30, < 3.1.47 |
| chainguard | checkov | 0 |
| chainguard | datahub-ingestion-fips | 0 |
| wolfi | open-webui | 0 |
| chainguard | opal | 0 |
| wolfi | checkov | 0 |
| gitpython-developers | GitPython | 3.1.30 |
| chainguard | mlflow-fips | 0 |
| wolfi | mlflow | 0, 0 |
| PyPI | GitPython | 3.1.30 |
| chainguard | awx | 0 |
| chainguard | open-webui | 0 |
| chainguard | mlflow | 0, 0 |
| alpine | py3-gitpython | 0 |
Timeline
- May 7, 2026 CVE Published
- May 8, 2026 Security Advisory (2 in total, the first dated here)
- May 9, 2026 CVE Updated
- May 18, 2026 EPSS Score (30 in total, the first dated here)
- Aug 4, 2026 Coalition ESS Score
- Sep 4, 2026 Distribution Patch
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2026-42215
vulnetix vdb fixes CVE-2026-42215
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2026-42215/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-rpm5-65cw-6hj4 x_refsource_CONFIRM
- https://github.com/gitpython-developers/GitPython/releases/tag/3.1.47 x_refsource_MISC
- https://nvd.nist.gov/vuln/detail/CVE-2026-42215 advisory
- https://github.com/advisories/GHSA-rpm5-65cw-6hj4 advisory
- https://github.com/gitpython-developers/GitPython url