# CVE-2026-8643: pip can extract console_scripts and gui_scripts outside installation directory

> Attackers can install malicious entry points outside the intended directory via crafted package metadata, potentially leading to code execution or privilege escalation.

- **Severity:** Medium 4.1 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 1 Jun 2026
- **Updated:** 16 Sep 2026
- **Also known as:** ALSA-2026:36193, ALSA-2026:36315, AZL-89325, AZL-89463, BELL-CVE-2026-8643, CLEANSTART-2026-HB96451, DEBIAN-CVE-2026-8643, ECHO-e120-768d-97d2, GHSA-wf93-45jw-7689, MINI-5x67-333m-f4gj, MINI-75pp-5cxq-4wc8, MINI-77qj-hgpq-xf63, MINI-8v39-v7x2-9fh3, MINI-cv85-xv3x-cpxx, MINI-ggf7-89fx-r2m8, MINI-wpxp-ww36-vv9q, OESA-2026-2629, OESA-2026-2630, OESA-2026-2631, PYSEC-2026-196, RHSA-2026:34891, RHSA-2026:36193, RHSA-2026:36315, RLSA-2026:36193, RLSA-2026:36315, ROOT-APP-PYPI-CVE-2026-8643, ROOT-OS-DEBIAN-13-CVE-2026-8643, SUSE-SU-2026:22300-1, UBUNTU-CVE-2026-8643, openSUSE-SU-2026:10940-1, openSUSE-SU-2026:20993-1

## What is CVE-2026-8643?

CVE-2026-8643 is a medium-severity path traversal vulnerability in Python Packaging Authority pip, published on 1 Jun 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 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.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

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

3 open source packages ship an affected version, including pip. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `pip` | PyPI | All versions | 26.1.2 |
| `pip` | PyPI | All versions | 26.1.2 |
| `pip` | PyPI | All versions | 26.1.2 |
| `python3.14-pip` | AlmaLinux:10 | All versions | 25.2-3.el10_2.5 |
| `python3.14-pip-wheel` | AlmaLinux:10 | All versions | 25.2-3.el10_2.5 |
| `python3.14-pip` | AlmaLinux:9 | All versions | 25.2-3.el9_8.5 |
| `python3.14-pip-wheel` | AlmaLinux:9 | All versions | 25.2-3.el9_8.5 |
| `python3.14-pip` | Red Hat:enterprise_linux:10.2 | All versions | 0:25.2-3.el10_2.5 |
| `python3.14-pip-wheel` | Red Hat:enterprise_linux:10.2 | All versions | 0:25.2-3.el10_2.5 |
| `python3.14-pip` | Red Hat:enterprise_linux:9::appstream | All versions | 0:25.2-3.el9_8.5 |
| `python3.14-pip-wheel` | Red Hat:enterprise_linux:9::appstream | All versions | 0:25.2-3.el9_8.5 |
| `python-pip` | Red Hat:hummingbird:1 | All versions | 0:26.1.1-3.1.hum1 |
| `python-pip-wheel` | Red Hat:hummingbird:1 | All versions | 0:26.1.1-3.1.hum1 |
| `python3-pip` | Red Hat:hummingbird:1 | All versions | 0:26.1.1-3.1.hum1 |
| `python3.14-pip` | Rocky Linux:10 | All versions | 0:25.2-3.el10_2.5 |
| `python3.14-pip` | Rocky Linux:9 | All versions | 0:25.2-3.el9_8.5 |
| `python-pip` | SUSE:Linux Enterprise Server 16.0 | All versions | 25.0.1-160000.5.1 |
| `python-pip` | SUSE:Linux Enterprise Server for SAP applications 16.0 | All versions | 25.0.1-160000.5.1 |
| `python-pip` | openSUSE:Leap 16.0 | All versions | 25.0.1-160000.5.1 |
| `python-pip` | openSUSE:Tumbleweed | All versions | 26.1.2-1.1 |

Products: Pypa Pip.

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

Upgrade pip to 26.1.2 or later.

## Is CVE-2026-8643 being exploited?

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

## Other vulnerabilities in Python Packaging Authority pip

- [CVE-2018-20225](https://insights.sbomify.com/CVE-2018-20225/): Supply chain in n/a (high 7.8)
- [CVE-2013-1629](https://insights.sbomify.com/CVE-2013-1629/): Improper Input Validation in pip (medium 6.8)
- [CVE-2026-13346](https://insights.sbomify.com/CVE-2026-13346/): pip absolute path traversal during download from malicious package indexes (medium 5.6)
- [CVE-2023-5752](https://insights.sbomify.com/CVE-2023-5752/): Mercurial configuration injectable in repo revision when installing via pip (medium 5.5)

## Fix prompt for AI coding agents

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

What it is: CVE-2026-8643 is a medium-severity path traversal vulnerability in Python Packaging Authority pip, published on 1 Jun 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-8643 in the wild and no public exploit code.

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

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-8643/ (Markdown: https://insights.sbomify.com/CVE-2026-8643/index.md)
```

## Sources

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

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