CVE-2026-6357 pip self-update functionality can import newly installed modules after wheel installation

Medium 5.3 Published Updated

Attackers can execute arbitrary code by installing malicious wheels that are imported during pip's self-update check before the update completes.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-6357?

CVE-2026-6357 is a medium-severity code injection vulnerability in pip, published on 27 Apr 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

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.

Weakness: CWE-829

Which versions are affected by CVE-2026-6357?

3 open source packages ship an affected version, including pip.

PackageAffectedFixed in
pip PyPIAll versions26.1
pip PyPIAll versions26.1
pip PyPIAll versions26.1

How do I fix CVE-2026-6357?

Upgrade pip to 26.1 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-6357 being exploited?

There is no known exploitation of CVE-2026-6357 in the wild and no public exploit code.

Sources

Also known as AZL-85011, AZL-85265, BELL-CVE-2026-6357, CLEANSTART-2026-SE54902, CLEANSTART-2026-ZI04041, DEBIAN-CVE-2026-6357 and 14 more.

Is CVE-2026-6357 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free