Skip to main content

pip CVE-2026-6357

| EUVDEUVD-2026-25857 MEDIUM
Inclusion of Functionality from Untrusted Control Sphere (CWE-829)
2026-04-27 PSF
5.3
CVSS 4.0 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Identify module names pip imports during self-update check
  2. Delivery
    Craft wheel containing identically named shadow module
  3. Exploit
    Publish to PyPI or accessible package index
  4. Install
    Induce victim to run pip install on malicious package
  5. C2
    pip writes wheel to site-packages
  6. Execute
    pip self-update check imports attacker's shadowing module
  7. Impact
    Arbitrary code executes in pip's process context

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V15 - Secure Coding and Architecture Trusted source inclusion only
Exploitation Conditions

Exploitation requires the victim to run pip install targeting a wheel package specifically crafted to contain a Python module whose name shadows one of the module names pip imports during its deferred self-update check phase. The shadowing module must be resolvable before the legitimate module on sys.path after installation, which is the default behavior when a package installs to site-packages ahead of standard library paths. The vulnerable code path is only triggered on subcommands that install wheels (primarily pip install); pip download, pip list, and other non-installing subcommands do not invoke the self-update check in the vulnerable sequence. Exploitation is further limited by: the victim must actively choose to install the malicious package; the attacker must know which specific module names pip's self-update routine imports (discoverable from pip's public source code); and the self-update check must not be explicitly disabled via --disable-pip-version-check or PIP_DISABLE_PIP_VERSION_CHECK. Running pip in isolated mode (--isolated) also suppresses the version check and would prevent exploitation.

Impact

Real-world risk is low despite the high C:H/I:H impact metrics. CVSS 4.0 scores this 5.3 (Medium), EPSS is 0.01% at the 2nd percentile, SSVC confirms no active exploitation and a non-automatable attack with only partial technical impact. The CVSS 4.0 AT:P (attack prerequisite) accurately captures the core constraint: the victim must be induced to install a specifically crafted malicious wheel, which is itself already an independently harmful supply-chain act. The C:H/I:H impact reflects execution in pip's process context-potentially elevated if pip is run with sudo-but this impact ceiling is only reached after overcoming the social-engineering prerequisite. The gap between the theoretical C:H/I:H impact and the near-zero EPSS reflects that exploiting this flaw offers no advantage over simply including directly malicious code in the wheel itself, making this a marginal incremental risk above the baseline threat of installing untrusted packages. No KEV listing and no known exploitation further support a low operational priority.

Exploit ScenarioDerived

An attacker publishes a malicious wheel to PyPI or a private package index that installs a Python module whose name matches one pip imports during its post-install self-update check. When a victim runs pip install <malicious-package>, pip writes the wheel contents to site-packages, then invokes the self-version check, which imports the attacker's module instead of the intended one, executing arbitrary code in pip's process. If pip was invoked with elevated privileges such as sudo pip install, the attacker's payload runs with administrative system access.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 24, 2026

Module import confusion in pip before version 26.1 allows a maliciously crafted wheel package to execute arbitrary code within pip's own process by exploiting the sequencing of pip's self-update check relative to wheel installation. Because pip deferred well-known module imports for startup performance and triggered the self-update check after wheels were installed, a freshly installed malicious module could shadow a legitimate import targeted by the self-update routine. No public exploit code is identified at time of analysis, EPSS sits at the 2nd percentile, and SSVC confirms no exploitation, though the CWE-829 root cause carries inherent supply-chain risk.

RemediationAI

Upgrade pip to version 26.1 or later using pip install --upgrade pip; this is the vendor-released patch confirmed by the PSF advisory at https://ichard26.github.io/blog/2026/04/whats-new-in-pip-26.1/#security-fixes and the upstream fix at https://github.com/pypa/pip/pull/13923. Red Hat and SUSE users should apply updated packages through their respective vendor channels as they become available. As a compensating control for environments that cannot immediately upgrade, setting the environment variable PIP_DISABLE_PIP_VERSION_CHECK=1 or passing --disable-pip-version-check to pip disables the self-update check entirely, closing the vulnerable code path at the cost of losing version-upgrade notifications. This workaround has no functional impact on package installation itself. The PSF also recommends that users review package contents before installation as a general practice regardless of pip version.

Affected VersionsENISA

pip 0 <26.1

Affected Packages

pypi pip fix: 26.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

pip deferred certain Python module imports to reduce CLI startup latency, and the self-version check (pip_self_version_check / handle_pip_version_check) was invoked after wheel installation completed. Python's import system resolves module names by searching sys.path, which includes site-packages directories where newly installed wheels land. A malicious wheel that places a module with the same name as one pip imports during the self-update phase can shadow the intended module, causing pip to load and execute the attacker-controlled code. CWE-829 (Inclusion of Functionality from Untrusted Control Sphere) precisely describes this flaw: pip inadvertently incorporates functionality from an untrusted location it does not control. The patch in PR #13923 refactors the self-version check into a context manager with a fetch phase (before wheel installation) and an emit phase (after), ensuring all relevant module imports occur before any wheel content is written to disk.

Know when Pip gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 5.3 MEDIUM
CVSS:4.0/AV:L/AC:L/AT:P/PR:H/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
vuln.today AI 7.4 HIGH

Local vector because exploitation occurs on the victim's system during pip execution; AC:H for the module-name collision prerequisite (mapped from CVSS 4.0 AT:P); PR:N as the attacker needs no system privileges, only the ability to distribute a package; UI:R for the required victim action of running pip install; S:C and C:H/I:H reflecting code execution within pip's potentially privileged process.

3.1 AV:L/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N
4.0 AV:L/AC:H/AT:P/PR:N/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
SUSE 5.8 MEDIUM
AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N
Red Hat 5.8 MEDIUM

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
High
User Interaction
Active
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

3
CVSS changed
Apr 27, 2026 - 15:22 NVD
5.3 (MEDIUM)
Patch released
Apr 27, 2026 - 15:00 nvd
Patch available
CVE Published
Apr 27, 2026 - 14:19 nvd
MEDIUM 5.3

DescriptionCVE.org

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.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 1 pypi packages depend on pip (1 direct, 0 indirect)

Ecosystem-wide dependent count for version 26.1.

Threat Intelligence Overview

EPSS Score
0.0%
Top 98% exploitable
Prevalence
Ubiquitous
pip is the standard Python package installer present in virtually all Python environments globally
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in Pip

View all
CVE-2013-1629 MEDIUM POC
6.8 Aug 06

pip before 1.3 uses HTTP to retrieve packages from the PyPI repository, and does not perform integrity checks on package

CVE-2018-20225 HIGH
7.8 May 08

An issue was discovered in pip (all versions) because it installs the version with the highest version number, even if t

CVE-2026-136440 HIGH
7.3 Nov 24

Local privilege escalation in the Python Packaging Authority's pip package installer lets an attacker who already holds

CVE-2021-3572 MEDIUM
5.7 Nov 10

A flaw was found in python-pip in the way it handled Unicode separators in git references. Rated medium severity (CVSS 5

CVE-2026-13346 MEDIUM
5.6 Jul 29

Path traversal in pip (CWE-36) allows a malicious package index to write downloaded wheel files to arbitrary filesystem

CVE-2026-3219 MEDIUM
4.6 Apr 20

pip before version 26.1 incorrectly treats concatenated tar and ZIP archives as ZIP files regardless of filename, potent

CVE-2026-8643 MEDIUM
4.1 Jun 01

Path traversal during wheel installation in pip allows a malicious package's console_scripts or gui_scripts entry point

CVE-2023-5752 LOW
3.3 Oct 25

When installing a package from a Mercurial VCS URL (ie "pip install hg+...") with pip prior to v23.3, the specified Merc

CVE-2013-1888 LOW
2.1 Aug 17

pip before 1.3 allows local users to overwrite arbitrary files via a symlink attack on a file in the /tmp/pip-build temp

CVE-2014-8991 LOW
2.1 Nov 24

pip 1.3 through 1.5.6 allows local users to cause a denial of service (prevention of package installation) by creating a

Vendor StatusVendor

SUSE

Severity: Medium
Product Status
SUSE Linux Enterprise Server LTSS Extended Security 12 SP5 Affected
SLES15-SP5-CHOST-BYOS-SAP-CCloud Fixed
SLES15-SP6-CHOST-BYOS Fixed
SLES15-SP6-CHOST-BYOS-Aliyun Fixed
SLES15-SP6-CHOST-BYOS-Azure Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy