Skip to main content

pip CVE-2026-13346

| EUVDEUVD-2026-50467 MEDIUM
Absolute Path Traversal (CWE-36)
2026-07-29 PSF GHSA-qwm4-qh6w-59xr
5.6
CVSS 4.0 · Vendor: PSF
View

Attack ChainAIDerived

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

  1. Access
    Attacker hosts malicious PyPI-compatible index with crafted wheel URL
  2. Delivery
    Victim runs pip download --only-binary against attacker index
  3. Exploit
    pip fetches doubly-encoded package URL from index
  4. Execution
    Link.filename double-decodes path separators from URL
  5. Persist
    os.path.join resolves traversal sequences outside download directory
  6. Impact
    Attacker-specified file written to arbitrary filesystem location

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Absolute path validation
Exploitation Conditions

Two specific conditions must both be satisfied: first, the victim must direct pip at a malicious or attacker-controlled PyPI-compatible package index, either by passing --index-url or --extra-index-url pointing to the attacker's server, or by having a compromised pip.conf / pyproject.toml index configuration - the official PyPI index cannot be used to deliver the crafted URL. Second, the victim must invoke pip download with the --only-binary flag (e.g., pip download --only-binary :all:); the description explicitly states this is the only materially impacted use case, as source distribution installs from untrusted indexes already execute arbitrary code and are inherently unsafe. Exploitation is further limited by: required active user interaction (the victim must run the pip command, UI:A), high attack complexity due to the need for a convincing malicious index that the victim is tricked into targeting (AC:H), and OS-level file permission boundaries that constrain what paths the pip process can overwrite.

Impact

The provided CVSS 4.0 score of 5.6 (AV:N/AC:H/AT:P/PR:H/UI:A) reflects medium severity with significant exploitation constraints. The PR:H metric in the official vector is atypical for an attacker-controlled index scenario - from an attacker's perspective no system-level privileges on the victim machine are required; PR:H may instead reflect the operational barrier of needing to serve a convincing malicious index that the victim's pip is directed toward. Attack complexity is genuinely high (AC:H) because exploitation requires the victim to explicitly target a malicious or compromised index URL. The CVE description explicitly bounds primary impact to pip download --only-binary, since installing source distributions from an untrusted index already executes arbitrary code and is treated as an inherently unsafe operation. No EPSS score, no CISA KEV listing, and no POC availability data were provided, leaving exploitation probability unquantifiable but assessed as no public exploit identified at time of analysis. File write impact (VI:H) is bounded by the OS permissions of the pip process - non-root pip invocations limit attacker reach significantly. Overall this is a real but constrained integrity risk, most relevant to CI/CD pipelines downloading wheels from third-party indexes with elevated process privileges.

Exploit ScenarioDerived

An attacker registers a domain serving a PyPI-compatible package index and publishes a wheel with a URL containing doubly-percent-encoded traversal sequences such as %252E%252E%252F in the filename field. A developer or CI job running pip download --only-binary :all: --index-url https://attacker.example/simple/ targetpackage fetches the wheel, pip double-decodes the filename to include ../ components, and os.path.join writes the file to an attacker-specified path outside the download directory - potentially overwriting a startup script, SSH authorized_keys, or application configuration accessible to the pip process. No public POC has been identified at time of analysis.

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

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

Alert me

AnalysisAIv1 – Jul 29, 2026

Path traversal in pip (CWE-36) allows a malicious package index to write downloaded wheel files to arbitrary filesystem locations outside the intended download directory. The root cause is pip's Link.filename property double-decoding percent-encoded URL path segments, letting an attacker embed encoded path separators that survive initial URL parsing but resolve during the second urllib.parse.unquote() call. Practical impact is most material for pip download --only-binary workflows pointed at untrusted indexes; no public exploit or active exploitation has been identified at time of analysis.

RemediationAI

Upgrade pip to the patched version once it is tagged and published to PyPI following PR #14110 (https://github.com/pypa/pip/pull/14110); a confirmed release version number is not available in the current data, so monitor the Python Security Announce list at https://mail.python.org/archives/list/security-announce@python.org/thread/L2BNQGGVQCEV7DROOORQ7WFKKFF2OOQX/ for the official release announcement. As an immediate compensating control, avoid running pip download --only-binary against untrusted, third-party, or attacker-controlled package indexes; restrict index sources to the official PyPI endpoint or internally audited mirrors. Running pip as a minimally privileged, non-root user limits the blast radius of any successful path traversal to directories accessible to that user account. Organizations using --extra-index-url in CI pipelines should audit those configurations to ensure only trusted indexes are referenced.

Affected VersionsENISA

pip 0 <26.2

Affected Packages

pypi pip fix: 26.2, 26.2.0

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's Link.filename property in src/pip/_internal/models/link.py applied urllib.parse.unquote() to a URL path segment that was already partially decoded during standard URL parsing, producing a second decoding pass. A malicious PyPI-compatible index could serve wheel URLs containing doubly-percent-encoded path separators - for example, %252F (encoding of %2F) survives the first decode as %2F but resolves to a literal / after the second unquote() call. The resulting filename, now containing embedded slashes or .. components, was passed directly to os.path.join(location, filename) in download.py, causing the file to be written outside the intended download directory. The upstream fix (PR #14110) introduces a PathComponent newtype with a _to_path_component() sanitizer using os.path.basename() for strict reduction to a single path component, and a join_within_directory() function that enforces containment at the type level, preventing the value from escaping the target directory. Affected product CPE: cpe:2.3:a:python_packaging_authority:pip:*:*:*:*:*:*:*:*. Root cause class is CWE-36 (Absolute Path Traversal).

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 5.6 MEDIUM
CVSS:4.0/AV:N/AC:H/AT:P/PR:H/UI:A/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
vuln.today AI 5.3 MEDIUM

Attacker controls a remote index server (AV:N, PR:N); victim must actively run pip download against it (UI:R, AC:H); only filesystem integrity is impacted (I:H, C:N, A:N).

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

Primary rating from Vendor (PSF).

CVSS VectorVendor: PSF

Attack Vector
Network
Attack Complexity
High
Attack Requirements
Present
Privileges Required
High
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

DescriptionCVE.org

pip would incorrectly handle doubly-encoded package URLs from indexes allowing for files to be installed to arbitrary locations on disk even when installing wheels.

This vulnerability requires downloading or installing a package from a malicious package index to succeed, malicious packages alone are not able to exploit this vulnerability. Note that this vulnerability only materially impacts users running pip download with the --only-binary option as installing source distributions from an untrusted index is already an unsafe operation that executes code during install time.

Blast Radius

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

Ecosystem-wide dependent count for version 26.2.0.

Threat Intelligence Overview

EPSS Score
0.3%
Top 73% exploitable
Prevalence
Ubiquitous
standard Python package installer present in virtually all Python environments
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.3%
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
Open
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

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

Attack Technique

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SLES15-SP5-CHOST-BYOS-SAP-CCloud Not-Affected
SLES15-SP5-CHOST-BYOS-SAP-CCloud Affected
SLES15-SP6-CHOST-BYOS Affected
SLES15-SP6-CHOST-BYOS-Aliyun Affected
SLES15-SP6-CHOST-BYOS-Azure Affected

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