REDHAT-BUG-2463234: Medium severity pypi/pip vulnerability
pip prior to version 26.1 would run self-update check functionality after installing wheel files which required importing well-known Python modules names. These module imports were intentionally deferred to increase startup time of the pip CLI. The patch changes self-update functionality to run before wheels are installed to prevent newly-installed modules from being imported shortly after the installation of a wheel package. Users should still review package contents prior to installation.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pipto a version that resolves this vulnerability.Fixed in 26.1 - Compensating control
Review package contents prior to installation.
Event History
Frequently Asked Questions
Which pip installations are affected?
pip versions earlier than 26.1 are affected. The issue occurs when pip installs wheel files and subsequently performs its self-update check.
What conditions are needed for exploitation?
An attacker would need a wheel package whose installed contents use well-known Python module names that pip imports during the post-install self-update check. Installing an unreviewed or malicious wheel creates the relevant exposure.
Does updating pip address the issue?
Yes. The patch in pip 26.1 moves the self-update functionality to run before wheel installation, preventing newly installed modules from being imported shortly afterward.
What can be done if pip cannot be updated immediately?
Review wheel and package contents before installation, particularly when installing packages from untrusted sources. This is specifically recommended because installed package contents may affect imports performed after installation.