Skip to main content

pip CVE-2026-8643

| EUVDEUVD-2026-33682 MEDIUM
Path Traversal (CWE-22)
2026-06-01 PSF GHSA-wf93-45jw-7689
4.1
CVSS 4.0 · Vendor: PSF
View

Attack ChainAIDerived

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

  1. Access
    Craft wheel with path-traversal console_scripts entry point
  2. Delivery
    Publish to PyPI or compromised package index
  3. Exploit
    Victim runs pip install on malicious package
  4. Execution
    pip joins traversal name to scripts directory without validation
  5. Persist
    os.path.join resolves path outside scripts directory
  6. Impact
    Attacker-controlled script written to arbitrary filesystem location

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that a victim actively executes pip install (CVSS UI:A) on a malicious package containing console_scripts or gui_scripts entry points with path traversal names such as ../../outside, /etc/cron.d/name, or a Windows drive-absolute path. CVSS AT:P (attack requirements present) indicates a prerequisite condition: the attacker must control or compromise a package reachable from the victim's configured pip index. The installing user must have write permission to the traversal target path - writing to system directories like /etc/cron.d/ requires root or equivalent privileges during installation. Installation within a virtual environment limits the traversal scope: because the scripts directory is inside the venv, traversal targets resolve relative to the venv root, significantly reducing blast radius. Standard user installations without elevated privileges cannot write to system paths. No special pip configuration beyond default is required; any pip install invocation that processes a wheel with crafted entry points is affected.

Impact

The CVSS 4.0 score of 4.1 reflects substantial mitigating factors: local attack vector (AV:L), attack requirements present (AT:P), low privileges required (PR:L), and active user interaction required (UI:A - victim must explicitly invoke pip install). The integrity impact on the vulnerable system is High (VI:H) with no confidentiality or availability impact, and no subsequent system impact. Real-world risk is moderate and supply-chain-dependent: an attacker must control a package reachable by the victim's pip configuration (via PyPI, a private index, or a compromised dependency), and the file write lands where the installing user has write access. System-level impact requires elevated installation privileges. EPSS data is not present in available intelligence and cannot be inferred. No KEV listing and no public exploit are identified - this lowers urgency relative to the VI:H signal. The tag 'Information Disclosure' applied to this CVE appears inconsistent with the actual impact of unauthorized file writes (integrity, not confidentiality); defenders should not rely on that tag for triage. CVSS vector indicates authenticated (PR:L) exploitation, meaning anonymous remote exploitation against default configurations is not the threat model.

Exploit ScenarioDerived

An attacker publishes a malicious Python package to PyPI - or injects it into a private package index trusted by a target organization - containing a console_scripts entry point with a name such as ../../etc/cron.d/backdoor pointing to attacker-controlled Python code. When a developer or CI pipeline runs pip install on the malicious package, pip joins the traversal name onto the scripts directory path without containment validation, writing the generated script file to /etc/cron.d/backdoor or another arbitrary location writable by the installing process. No public exploit code is identified at time of analysis, but the technique is straightforward to implement given the public PR diff.

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 – Jun 01, 2026

Path traversal during wheel installation in pip allows a malicious package's console_scripts or gui_scripts entry point names to be written outside the intended scripts directory. All pip versions are listed as affected (CPE covers wildcard versions), and exploitation requires a victim to run pip install on a specially crafted package - making this a supply chain attack vector. No public exploit code is identified at time of analysis, no KEV listing exists, and a vendor fix is available upstream via PR #14000, though no specific patched release version is independently confirmed from available intelligence.

RemediationAI

Upgrade pip to the patched release once a tagged version incorporating PR #14000 (https://github.com/pypa/pip/pull/14000) is published - the exact fixed version is not independently confirmed from available data (upstream fix available as PR/commit; released patched version not independently confirmed). Consult the PSF advisory at https://mail.python.org/archives/list/security-announce@python.org/thread/YV63UET5D3OOJY7O4M5XCVYO2YM4NBYJ/ for the authoritative patched version. As compensating controls prior to patching: install packages only within virtual environments, which restricts the scripts directory and therefore limits traversal impact to paths within the venv tree rather than system directories; use pip install --require-hashes with an explicit requirements file to prevent installation of packages not pinned to verified hashes, reducing exposure to tampered or injected packages (note: this does not protect against a malicious but correctly hashed package); restrict pip access to trusted, audited package sources by configuring index-url and extra-index-url to internal mirrors only.

Affected VersionsENISA

pip 0 <26.1.2

Affected Packages

pypi pip fix: 26.1.2

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 uses distlib to process wheel entry points. When installing console_scripts or gui_scripts from a wheel, pip constructs the script file path by joining the entry point name directly onto the scripts directory using os.path.join(), without validating that the resolved path remains within that directory. Entry point names containing path traversal components (e.g., ../../etc/cron.d/name, absolute paths like /etc/cron.d/name, or Windows drive-letter paths like D:\outside) cause os.path.join() to resolve outside the intended scripts directory. The fix in PR #14000 introduces _script_within_dir(), which normalizes both the scripts root and candidate destination with os.path.normpath() and asserts the destination starts with the root plus os.sep - a standard path containment check. The affected CPE is cpe:2.3:a:python_packaging_authority:pip:*:*:*:*:*:*:*:*. No CWE is assigned in available data, but the root cause class is path traversal (analogous to CWE-22).

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

Vendor (PSF) PRIMARY 4.1 MEDIUM
CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
SUSE 8.1 HIGH
AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H
Red Hat 8.0 HIGH

Primary rating from Vendor (PSF).

CVSS VectorVendor: PSF

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

Lifecycle Timeline

1
CVSS changed
Jun 01, 2026 - 17:22 NVD
4.1 (MEDIUM)

DescriptionCVE.org

pip would treat console_scripts and gui_scripts as paths instead of file names without sanitizing the resolved absolute path to the installation directory, leading to entry points being installed outside the installation directory.

Threat Intelligence Overview

EPSS Score
0.0%
Top 98% exploitable
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment MSRC 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
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

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

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

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-6357 MEDIUM
5.3 Apr 27

Module import confusion in pip before version 26.1 allows a maliciously crafted wheel package to execute arbitrary code

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-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: High
Product Status
openSUSE Tumbleweed Fixed
SLES15-SP5-CHOST-BYOS-SAP-CCloud Fixed
SLES15-SP5-CHOST-BYOS-SAP-CCloud Fixed
SLES15-SP6-CHOST-BYOS Fixed
SLES15-SP6-CHOST-BYOS-Aliyun Fixed

References

Advisories & patches
PATCH https://github.com/pypa/pip/pull/14000 ADVISORY https://mail.python.org/archives/list/security-announce@python.org/thread/YV63UET5D3OOJY7O4M5XCVYO2YM4NBYJ/ ADVISORY https://nvd.nist.gov/vuln/detail/CVE-2026-8643 ADVISORY https://ubuntu.com/security/notices/USN-9294-1 ADVISORY https://vuldb.com/vuln/366890 REF http://www.openwall.com/lists/oss-security/2026/06/01/5 REF https://access.redhat.com/errata/RHSA-2026:33313 REF https://access.redhat.com/errata/RHSA-2026:34374 REF https://access.redhat.com/errata/RHSA-2026:34456 REF https://access.redhat.com/errata/RHSA-2026:34739 REF https://access.redhat.com/errata/RHSA-2026:34740 REF https://access.redhat.com/errata/RHSA-2026:34741 REF https://access.redhat.com/errata/RHSA-2026:34748 REF https://access.redhat.com/errata/RHSA-2026:34749 REF https://access.redhat.com/errata/RHSA-2026:34750 REF https://access.redhat.com/errata/RHSA-2026:34752 REF https://access.redhat.com/errata/RHSA-2026:34756 REF https://access.redhat.com/errata/RHSA-2026:34758 REF https://access.redhat.com/errata/RHSA-2026:34760 REF https://access.redhat.com/errata/RHSA-2026:34765 REF https://access.redhat.com/errata/RHSA-2026:34772 REF https://access.redhat.com/errata/RHSA-2026:34773 REF https://access.redhat.com/errata/RHSA-2026:34774 REF https://access.redhat.com/errata/RHSA-2026:34775 REF https://access.redhat.com/errata/RHSA-2026:34776 REF https://access.redhat.com/errata/RHSA-2026:34777 REF https://access.redhat.com/errata/RHSA-2026:34778 REF https://access.redhat.com/errata/RHSA-2026:34780 REF https://access.redhat.com/errata/RHSA-2026:34891 REF https://access.redhat.com/errata/RHSA-2026:36193 REF https://access.redhat.com/errata/RHSA-2026:36315 REF https://access.redhat.com/errata/RHSA-2026:37275 REF https://access.redhat.com/errata/RHSA-2026:37283 REF https://access.redhat.com/errata/RHSA-2026:42078 REF https://access.redhat.com/errata/RHSA-2026:42079 REF https://access.redhat.com/errata/RHSA-2026:42132 REF https://access.redhat.com/errata/RHSA-2026:42144 REF https://access.redhat.com/errata/RHSA-2026:42644 REF https://access.redhat.com/errata/RHSA-2026:50479 REF https://access.redhat.com/errata/RHSA-2026:54760 REF https://access.redhat.com/errata/RHSA-2026:56347 REF https://access.redhat.com/errata/RHSA-2026:60520 REF https://access.redhat.com/security/cve/CVE-2026-8643 REF https://bugzilla.redhat.com/show_bug.cgi?id=2460927 REF https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-8643.json

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