virtualenv: Downloaded seed wheels (pip/setuptools) are not integrity-checked before use
What fixes it
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
download_wheel() runs pip download and hands the result straight to the seeder, with nothing checking the bytes it gets back. The embedded pip and setuptools wheels carry a BUNDLE_SHA256 that virtualenv checks on every load, but a wheel fetched over the network for the periodic-update feature or the --download flag had no equivalent verification.
A compromised index, a stale mirror, or a MITM'd download (when TLS is intercepted, e.g. via a misconfigured or malicious CA) could substitute a different wheel under the same distribution/version/filename, and virtualenv would cache and seed it into every environment created afterward with no warning.
Fixed by computing the downloaded wheel's sha256 and comparing it against the digest PyPI's public JSON API reports for that exact release, independent of which index actually served the file. The check is skipped, not treated as failure, when a custom index (PIP_INDEX_URL, PIP_EXTRA_INDEX_URL, PIP_INDEX) is configured, since a private index can legitimately serve a different, intentionally rebuilt wheel. Fix: https://github.com/pypa/virtualenv/pull/3251
Text from GitHub Advisory Database
Affected versions 53
- virtualenv, pip<= 21.7.11GitHub
- virtualenvaffected: < 21.7.12CVE List
- virtualenv, PyPIfrom first release, fixed in 21.7.12OSV
- virtualenv, PyPI0.8OSV
- virtualenv, PyPI0.8.1OSV
- virtualenv, PyPI0.8.2OSV
- virtualenv, PyPI0.8.3OSV
- virtualenv, PyPI0.8.4OSV
- virtualenv, PyPI0.9OSV
- virtualenv, PyPI0.9.1OSV
- virtualenv, PyPI0.9.2OSV
- virtualenv, PyPI1.0OSV
- virtualenv, PyPI1.1OSV
- virtualenv, PyPI1.10OSV
- virtualenv, PyPI1.10.1OSV
- virtualenv, PyPI1.11OSV
- virtualenv, PyPI1.11.1OSV
- virtualenv, PyPI1.11.2OSV
- virtualenv, PyPI1.11.3OSV
- virtualenv, PyPI1.11.4OSV
- virtualenv, PyPI1.11.5OSV
- virtualenv, PyPI1.11.6OSV
- virtualenv, PyPI1.2OSV
- virtualenv, PyPI1.3OSV
- virtualenv, PyPI1.3.1OSV
- virtualenv, PyPI1.3.2OSV
- virtualenv, PyPI1.3.3OSV
- virtualenv, PyPI1.3.4OSV
- virtualenv, PyPI1.4OSV
- virtualenv, PyPI1.4.1OSV
- virtualenv, PyPI1.4.2OSV
- virtualenv, PyPI1.4.3OSV
- virtualenv, PyPI1.4.4OSV
- virtualenv, PyPI1.4.5OSV
- virtualenv, PyPI1.4.6OSV
- virtualenv, PyPI1.4.7OSV
- virtualenv, PyPI1.4.8OSV
- virtualenv, PyPI1.4.9OSV
- virtualenv, PyPI1.4rc1OSV
- virtualenv, PyPI1.5OSV
- virtualenv, PyPI1.5.1OSV
- virtualenv, PyPI1.5.2OSV
- virtualenv, PyPI1.6OSV
- virtualenv, PyPI1.6.1OSV
- virtualenv, PyPI1.6.2OSV
- virtualenv, PyPI1.6.3OSV
- virtualenv, PyPI1.6.4OSV
- virtualenv, PyPI1.7OSV
- virtualenv, PyPI1.7.1OSV
- virtualenv, PyPI1.7.1.1OSV
- virtualenv, PyPI1.7.1.2OSV
- virtualenv, PyPI1.7.2OSV
- virtualenv, PyPI1.8OSV
References 9
- github.com/pypa/virtualenv/commit/a01ed3e2f239d6ab1fce62c5c7664ccf268fff6dFixvia CVE List
- github.com/pypa/virtualenv/releases/tag/21.7.12Fixvia GitHub
- github.com/pypa/virtualenv/security/advisories/GHSA-94p9-xgh2-xp45Advisoryvia CVE List
- github.com/pypa/advisory-database/tree/main/vulns/virtualenv/PYSEC-2026-4011.yamlAdvisoryvia GitHub
- github.com/advisories/GHSA-94p9-xgh2-xp45Advisoryvia GitHub
- nvd.nist.gov/vuln/detail/CVE-2026-102930Referencevia GitHub
- github.com/pypa/virtualenv/pull/3251Referencevia CVE List
- github.com/pypa/virtualenvReferencevia GitHub
- pypi.org/project/virtualenvReferencevia GitHub