CVE-2026-47764: Pdm Path Traversal Vulnerability

HIGH
Advisory Identifier: GHSA-78v8-vpjp-cjqh
CWE-22
Published
Advisory Summary

CVE-2026-47764 is a HIGH path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Pdm libraries in the PyPI ecosystem. The issue involves pdm wheel installation leads to path traversal via overridden write_to_fs. Remediation is available by upgrading affected packages to version 2.27.0.

CVE-2026-47764 at a Glance

CVE Identifier CVE-2026-47764
GHSA Identifier GHSA-78v8-vpjp-cjqh
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Pdm
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2026-47764

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

pdm fixed: 2.27.0
pip install pdm>=2.27.0
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 pdm

How to Check if You Are Affected

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

pip show pdm

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

Note: The pip show pdm 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 Pdm, 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

InstallDestination.write_to_fs() in src/pdm/installers/installers.py overrides the base class to add symlink/hardlink support but replaces the safe _path_with_destdir() (which validates via Path.resolve() + is_relative_to()) with a bare os.path.join() that performs no path validation. A malicious wheel with traversal entries can write arbitrary files. Same class as Poetry CVE-2026-34591. Fix ready at: https://github.com/pdm-project/pdm/pull/3787.

CVE-2026-47764 Affected Pdm Versions

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

References

Frequently Asked Questions

What is CVE-2026-47764?
CVE-2026-47764 is a security vulnerability in Pdm involving PDM wheel installation leads to Path Traversal via overridden write_to_fs under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Pdm versions are affected?
Affected versions include releases prior to 2.27.0 across affected packages: pdm.
What version fixes CVE-2026-47764?
Upgrading to 2.27.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pdm affected?
Yes, pdm is affected in releases prior to 2.27.0. Upgrade your dependency to 2.27.0 or later.
What CWE is associated with CVE-2026-47764?
CVE-2026-47764 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-47764?
Run the dependency tree command: 'pip show pdm'. 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-78v8-vpjp-cjqh",
  "modified" : "2026-06-10T20:33:13Z",
  "published" : "2026-06-10T20:33:13Z",
  "aliases" : [ "CVE-2026-47764" ],
  "summary" : "PDM  wheel installation leads to Path Traversal via overridden write_to_fs",
  "details" : "InstallDestination.write_to_fs() in src/pdm/installers/installers.py overrides the base class to add symlink/hardlink support but replaces the safe _path_with_destdir() (which validates via Path.resolve() + is_relative_to()) with a bare os.path.join() that performs no path validation. A malicious wheel with traversal entries can write arbitrary files. Same class as Poetry CVE-2026-34591. Fix ready at: https://github.com/pdm-project/pdm/pull/3787.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "pdm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.27.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.22.4"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/pdm-project/pdm/security/advisories/GHSA-78v8-vpjp-cjqh"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pdm-project/pdm/pull/3787"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pdm-project/pdm"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pdm-project/pdm/releases/tag/2.27.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-10T20:33:13Z",
    "nvd_published_at" : null
  }
}