REDHAT-BUG-2543652: High severity pypi/virtualenv vulnerability
virtualenv is a tool for creating isolated virtual python environments. Prior to 21.7.12, downloadwheel() accepts pip and setuptools seed wheels fetched for periodic updates or the --download option without checking their bytes against an authoritative digest equivalent to the embedded wheels' BUNDLESHA256 verification. A compromised index, stale mirror, or intercepted TLS connection can substitute a different wheel under the requested distribution, version, and filename, after which virtualenv caches and seeds the attacker-controlled wheel into subsequently created environments. The verification applies to the default PyPI path and is intentionally skipped when PIPINDEXURL, PIPEXTRAINDEXURL, or PIPINDEX configures a custom index that may legitimately publish rebuilt wheels. This issue is fixed in version 21.7.12.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
virtualenvto a version that resolves this vulnerability.Fixed in 21.7.12
Event History
Frequently Asked Questions
Which environments are exposed to substituted seed wheels?
virtualenv versions prior to 21.7.12 are affected when obtaining pip or setuptools seed wheels through periodic updates or the --download option. A compromised package index, stale mirror, or intercepted TLS connection could provide a substituted wheel.
Are installations using the default PyPI index affected?
Yes. Digest verification applies to the default PyPI path in the fixed behavior, preventing substitution of wheels that match the requested distribution, version, and filename.
How do custom package indexes affect this issue?
Verification is intentionally skipped when PIP_INDEX_URL, PIP_EXTRA_INDEX_URL, or PIP_INDEX configures a custom index, because such indexes may legitimately publish rebuilt wheels. These configurations therefore do not receive the embedded-wheel digest verification described for the default PyPI path.
What is the available remediation?
Upgrade virtualenv to version 21.7.12 or later. The issue is fixed in 21.7.12.