CVE-2026-8643: pip Path Traversal Vulnerability

MODERATE
Advisory Identifier: GHSA-wf93-45jw-7689
CVSS 8.0
CWE-22
Published
Advisory Summary

CVE-2026-8643 is a MODERATE (CVSS 8.0) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting pip libraries in the PyPI ecosystem. The issue involves path traversal in console_scripts/gui_scripts entry point names allows installing scripts outside of target directory. Remediation is available by upgrading affected packages to version 26.1.2.

CVE-2026-8643 at a Glance

CVE Identifier CVE-2026-8643
GHSA Identifier GHSA-wf93-45jw-7689
Severity MODERATE
CVSS v3.1 Base Score 8.0
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product pip
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.0

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-8643

To remediate this vulnerability, upgrade all affected pip dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

pip fixed: 26.1.2
pip install pip>=26.1.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show pip

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-8643, inspect your installed packages using pip:

pip show pip

Analyze the terminal output to locate any version of pip in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 26.1.2), your application is affected.

Note: The pip show pip command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In pip, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2026-8643 Affected pip Versions

1 component(s)
Fixed Versions:
26.1.2
Product / Package Ecosystem Affected Versions Fixed Version
pip
PyPI
< 26.1.2
26.1.2

References

NVD — CVE-2026-8643 NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-8643
pip Source Repository REPOSITORY
https://github.com/pypa/pip/pull/14000
access.redhat.com/errata/rhsa-2026:33... WEB
https://access.redhat.com/errata/RHSA-2026:33313
access.redhat.com/errata/rhsa-2026:34... WEB
https://access.redhat.com/errata/RHSA-2026:34776
access.redhat.com/errata/rhsa-2026:34... WEB
https://access.redhat.com/errata/RHSA-2026:34777
access.redhat.com/errata/rhsa-2026:34... WEB
https://access.redhat.com/errata/RHSA-2026:34778
access.redhat.com/errata/rhsa-2026:34... WEB
https://access.redhat.com/errata/RHSA-2026:34780
access.redhat.com/errata/rhsa-2026:34... WEB
https://access.redhat.com/errata/RHSA-2026:34891
access.redhat.com/errata/rhsa-2026:36... WEB
https://access.redhat.com/errata/RHSA-2026:36193
access.redhat.com/errata/rhsa-2026:36... WEB
https://access.redhat.com/errata/RHSA-2026:36315
access.redhat.com/errata/rhsa-2026:37... WEB
https://access.redhat.com/errata/RHSA-2026:37275
access.redhat.com/errata/rhsa-2026:37... WEB
https://access.redhat.com/errata/RHSA-2026:37283
pip Security Information SECURITY
https://access.redhat.com/security/cve/CVE-2026-8643
bugzilla.redhat.com/show_bug.cgi WEB
https://bugzilla.redhat.com/show_bug.cgi?id=2460927
pip Source Repository REPOSITORY
https://github.com/pypa/advisory-database/tree/main/vulns/pip/PYSEC-2026-196.yaml
pip Source Repository REPOSITORY
https://github.com/pypa/pip
pip Security Information SECURITY
https://mail.python.org/archives/list/security-announce@python.org/thread/YV63UET5D3OOJY7O4M5XCVYO2YM4NBYJ
pip Security Information SECURITY
https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-8643.json
access.redhat.com/errata/rhsa-2026:34... WEB
https://access.redhat.com/errata/RHSA-2026:34374
access.redhat.com/errata/rhsa-2026:34... WEB
https://access.redhat.com/errata/RHSA-2026:34456
access.redhat.com/errata/rhsa-2026:34... WEB
https://access.redhat.com/errata/RHSA-2026:34739
access.redhat.com/errata/rhsa-2026:34... WEB
https://access.redhat.com/errata/RHSA-2026:34740
access.redhat.com/errata/rhsa-2026:34... WEB
https://access.redhat.com/errata/RHSA-2026:34741
access.redhat.com/errata/rhsa-2026:34... WEB
https://access.redhat.com/errata/RHSA-2026:34748
access.redhat.com/errata/rhsa-2026:34... WEB
https://access.redhat.com/errata/RHSA-2026:34749
access.redhat.com/errata/rhsa-2026:34... WEB
https://access.redhat.com/errata/RHSA-2026:34750
access.redhat.com/errata/rhsa-2026:34... WEB
https://access.redhat.com/errata/RHSA-2026:34752
access.redhat.com/errata/rhsa-2026:34... WEB
https://access.redhat.com/errata/RHSA-2026:34756
access.redhat.com/errata/rhsa-2026:34... WEB
https://access.redhat.com/errata/RHSA-2026:34758
access.redhat.com/errata/rhsa-2026:34... WEB
https://access.redhat.com/errata/RHSA-2026:34760
access.redhat.com/errata/rhsa-2026:34... WEB
https://access.redhat.com/errata/RHSA-2026:34765
access.redhat.com/errata/rhsa-2026:34... WEB
https://access.redhat.com/errata/RHSA-2026:34772
access.redhat.com/errata/rhsa-2026:34... WEB
https://access.redhat.com/errata/RHSA-2026:34773
access.redhat.com/errata/rhsa-2026:34... WEB
https://access.redhat.com/errata/RHSA-2026:34774
access.redhat.com/errata/rhsa-2026:34... WEB
https://access.redhat.com/errata/RHSA-2026:34775
pip Security Information SECURITY
http://www.openwall.com/lists/oss-security/2026/06/01/5

Frequently Asked Questions

What is CVE-2026-8643?
CVE-2026-8643 is a security vulnerability in pip involving Path traversal in console_scripts/gui_scripts entry point names allows installing scripts outside of target directory under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which pip versions are affected?
Affected versions include releases prior to 26.1.2 across affected packages: pip.
What version fixes CVE-2026-8643?
Upgrading to 26.1.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pip affected?
Yes, pip is affected in releases prior to 26.1.2. Upgrade your dependency to 26.1.2 or later.
What is the CVSS score of CVE-2026-8643?
CVE-2026-8643 has a CVSS v3.1 base score of 8.0 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-8643?
CVE-2026-8643 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check PyPI dependencies for CVE-2026-8643?
Run the dependency tree command: 'pip show pip'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-wf93-45jw-7689",
  "modified" : "2026-07-10T12:31:36Z",
  "published" : "2026-06-01T18:31:53Z",
  "aliases" : [ "CVE-2026-8643" ],
  "summary" : " pip: Path traversal in console_scripts/gui_scripts entry point names allows installing scripts outside of target directory",
  "details" : "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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "pip"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "26.1.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-8643"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/pip/pull/14000"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:33313"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:34776"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:34777"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:34778"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:34780"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:34891"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:36193"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:36315"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:37275"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:37283"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/security/cve/CVE-2026-8643"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2460927"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/pip/PYSEC-2026-196.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pypa/pip"
  }, {
    "type" : "WEB",
    "url" : "https://mail.python.org/archives/list/security-announce@python.org/thread/YV63UET5D3OOJY7O4M5XCVYO2YM4NBYJ"
  }, {
    "type" : "WEB",
    "url" : "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-8643.json"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:34374"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:34456"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:34739"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:34740"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:34741"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:34748"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:34749"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:34750"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:34752"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:34756"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:34758"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:34760"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:34765"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:34772"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:34773"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:34774"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:34775"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2026/06/01/5"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-08T21:00:36Z",
    "nvd_published_at" : "2026-06-01T17:17:35Z"
  }
}