# CVE-2026-3219: pip doesn't reject concatenated ZIP and tar archives

> Attackers can trick pip into installing malicious code by providing archives that are both ZIP and tar, bypassing format checks.

- **Severity:** Medium 4.6 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 20 Apr 2026
- **Updated:** 20 Apr 2026
- **Also known as:** AZL-83184, AZL-83432, BELL-CVE-2026-3219, CLEANSTART-2026-RR99050, CLEANSTART-2026-WY38697, DEBIAN-CVE-2026-3219, ECHO-e9f8-2dcb-3be1, GHSA-58qw-9mgm-455v, MINI-6g6w-v387-7qw8, MINI-8ff4-r566-jx9j, MINI-c9jr-63mv-v6fw, MINI-p485-xf58-39q5, MINI-qg3j-gr7j-35qg, MINI-rw9g-q9x5-6m4v, MINI-v3c6-qvcm-phg5, MINI-wf29-fvjq-9hwm, MINI-x329-h66v-fcrm, OESA-2026-2360, OESA-2026-2361, OESA-2026-2362, OESA-2026-2363, OESA-2026-2497, PYSEC-2026-2875, RHSA-2026:20074, ROOT-APP-PYPI-CVE-2026-3219, UBUNTU-CVE-2026-3219, openSUSE-SU-2026:10645-1

## What is CVE-2026-3219?

CVE-2026-3219 is a medium-severity vulnerability in Python Packaging Authority pip, published on 20 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 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.

Weakness: CWE-434 (Unrestricted Upload of File with Dangerous Type)

## Which versions are affected by CVE-2026-3219?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `pip` | PyPI | All versions | 26.1 |
| `pip` | PyPI | All versions | 26.1 |
| `pip` | PyPI | All versions | 26.1 |
| `python-pip` | Red Hat:hummingbird:1 | All versions | 0:26.1.1-3.hum1 |
| `python-pip-wheel` | Red Hat:hummingbird:1 | All versions | 0:26.1.1-3.hum1 |
| `python3-pip` | Red Hat:hummingbird:1 | All versions | 0:26.1.1-3.hum1 |
| `python-pip` | openSUSE:Tumbleweed | All versions | 26.1-1.1 |

## How do I fix CVE-2026-3219?

Upgrade pip to 26.1 or later.

## Is CVE-2026-3219 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-3219 and fix it if it is affected.

What it is: CVE-2026-3219 is a medium-severity vulnerability in Python Packaging Authority pip, published on 20 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.
Exploitation: There is no known exploitation of CVE-2026-3219 in the wild and no public exploit code.

Affected packages and fixed versions:
- pip (PyPI): affected all versions; fixed in 26.1
- pip (PyPI): affected all versions; fixed in 26.1
- pip (PyPI): affected all versions; fixed in 26.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-3219/ (Markdown: https://insights.sbomify.com/CVE-2026-3219/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-3219
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-3219
- OSV: https://osv.dev/vulnerability/CVE-2026-3219

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-3219/
Summaries are generated and may contain mistakes; the official description above is the record.
