Skip to main content

Pip CVE-2026-3219

| EUVDEUVD-2026-23866 MEDIUM
Unrestricted Upload of File with Dangerous Type (CWE-434)
2026-04-20 PSF GHSA-58qw-9mgm-455v
4.6
CVSS 4.0 · Vendor: PSF
View

Attack ChainAIDerived

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

  1. Access
    Craft polyglot archive file
  2. Delivery
    Host on untrusted package index or distribute via social engineering
  3. Exploit
    Victim invokes pip install with malicious archive
  4. Execution
    pip misidentifies format as ZIP only
  5. Persist
    pip extracts unintended contents
  6. Impact
    Malicious code executes during package setup or import

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V5 - File Handling File type validation, storage isolation
MITRE ATT&CK

2 techniques across 2 tactics: Command and Control, Persistence

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

Exploitation Conditions

The following specific conditions must be met: (1) Victim uses pip version before 26.1; (2) Victim attempts to install or process a file that is simultaneously valid as both a ZIP and tar archive (polyglot or concatenated file); (3) User interaction is required-the victim must consciously invoke pip to install or extract the archive; (4) The vulnerable code path is only triggered when pip attempts to determine and execute format-specific extraction for package installation, not all pip operations. The vulnerability does NOT require special pip configuration, non-default settings, or elevated privileges. It is NOT exploitable if the archive is uniquely identifiable as only one format (either pure ZIP or pure tar), which is the case for standard packages on PyPI. Exploitation is limited by: absence of a KEV listing (no confirmed active exploitation), lack of public proof-of-concept code, the requirement for user interaction and local file access, and pip's typical use with trusted package sources.

Impact

CVSS 4.6 (AV:L/AC:L/PR:N/UI:A) indicates low to moderate severity: local attack vector, low complexity, no privileges required, but mandatory user interaction (downloading and attempting to install a malicious archive). EPSS score not provided in input data. The absence of CISA KEV listing and no confirmed public exploit code suggests this is not currently exploited at scale. The real risk is asymmetric: for most pip users installing packages from trusted repositories (PyPI), the attack surface is negligible because repository hosting infrastructure validates uploads. However, for developers using pip with custom package indexes, local package mirrors, or accepting packages from untrusted sources, this becomes a supply-chain vector. The user interaction requirement (consciously installing a crafted package) is a significant limiting factor but not a guarantee-automated CI/CD pipelines downloading from compromised indexes could trigger it without explicit user awareness. This is a real vulnerability but contextual: high risk in environments with weak package validation, low risk in standard PyPI-only installations.

Exploit ScenarioDerived

An attacker crafts a polyglot archive (valid as both ZIP and tar formats simultaneously) containing malicious Python code as tar contents and benign code as ZIP contents. The attacker hosts this file on a compromised or attacker-controlled package index or distributes it via social engineering to a developer. When a pip user downloads and installs the package using pip < 26.1, pip's format detection incorrectly identifies it as ZIP-only and extracts the benign payload, while a standards-compliant tar parser would extract the malicious payload-creating divergence between the user's expectation (install declared package contents) and actual execution (install hidden malicious code, if the attacker controls downstream execution).

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 – Apr 20, 2026

pip before version 26.1 incorrectly treats concatenated tar and ZIP archives as ZIP files regardless of filename, potentially installing unintended package contents when ambiguous archive formats are processed. Local attackers with user interaction can exploit this during package installation to cause integrity confusion, where an archive's actual contents diverge from its declared format. The vulnerability requires local access and user interaction (downloading/installing a crafted archive), limiting real-world impact to supply-chain scenarios or direct social engineering of pip users.

RemediationAI

Upgrade pip to version 26.1 or later to obtain the vendor-released patch that restricts installation to archives uniquely identifiable as either ZIP or tar format, rejecting polyglot files. Use the command pip install --upgrade pip to apply the fix. For organizations unable to immediately update, implement compensating controls: enforce package source whitelist restrictions to only trusted PyPI mirrors or private indexes with upload validation, configure pip to verify package signatures using PEP 480 metadata or GPG if available, restrict pip's use to non-privileged user accounts to limit damage from malicious extraction, and audit package downloads via network monitoring to detect suspicious archive formats. The patch is available via GitHub PR #13870 (https://github.com/pypa/pip/pull/13870) and referenced in the PSF security announcement (https://mail.python.org/archives/list/security-announce@python.org/thread/QAJ5JIVWWCAJ4EZL2FP5MOOW35JS7LRJ/). Note that signature verification (if implemented) would not prevent extraction of unintended contents; package source restriction is the primary control.

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

The vulnerability resides in pip's archive format detection logic (CWE-434: Unrestricted Upload of File with Dangerous Type). When processing Python package archives, pip determines whether to extract contents using ZIP or tar handlers. The defect occurs when a single file is simultaneously valid as both a tar and ZIP archive (a concatenated or polyglot file), causing pip to default to ZIP extraction. Since ZIP and tar formats use different compression headers and directory structures, a crafted polyglot file could contain different payloads interpretable by each format. Affected versions include all pip releases before 26.1. The CPE cpe:2.3:a:python_packaging_authority:pip:*:*:*:*:*:*:*:* covers all pip versions; the EUVD advisory confirms pip versions 0 through 26.0 are vulnerable. The root cause is insufficient validation of archive format uniqueness before format-specific extraction proceeds.

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.6 MEDIUM
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
SUSE 3.3 LOW
AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
Red Hat 5.0 MEDIUM

Primary rating from Vendor (PSF).

CVSS VectorVendor: PSF

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

Lifecycle Timeline

2
Patch released
Apr 20, 2026 - 15:15 nvd
Patch available
CVE Published
Apr 20, 2026 - 14:55 nvd
MEDIUM 4.6

DescriptionCVE.org

pip handles concatenated tar and ZIP files as ZIP files regardless of filename or whether a file is both a tar and ZIP file. This behavior could result in confusing installation behavior, such as installing "incorrect" files according to the filename of the archive. New behavior only proceeds with installation if the file identifies uniquely as a ZIP or tar archive, not as both.

Threat Intelligence Overview

EPSS Score
0.0%
Top 98% exploitable
Social Media
2
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor CIRCL 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

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

Attack Technique

Malicious file upload attacks exploit insufficient validation when web applications accept user-provided files.

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-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: Low
Product Status
SLES15-SP5-CHOST-BYOS-SAP-CCloud Fixed
SLES15-SP6-CHOST-BYOS Fixed
SLES15-SP6-CHOST-BYOS-Aliyun Fixed
SLES15-SP6-CHOST-BYOS-Azure Fixed
SLES15-SP6-CHOST-BYOS-EC2 Fixed

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