Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. pdm
  4. ›
  5. CVE-2026-47781

CVE-2026-47781: PDM: Project-Controlled `.pdm-plugins` Content Executes Before CLI Parsing

June 11, 2026

PDM automatically loads project-local plugin paths from .pdm-plugins during Core initialization. Because this path is added via site.addsitedir(), attacker-controlled .pth files inside the project plugin directory are processed and can execute Python code before normal CLI handling begins.

This allows arbitrary code execution with the privileges of the user running pdm from an untrusted repository checkout.

References

  • github.com/advisories/GHSA-qq6c-99pv-prvf
  • github.com/pdm-project/pdm/releases/tag/2.27.0
  • github.com/pdm-project/pdm/security/advisories/GHSA-qq6c-99pv-prvf
  • nvd.nist.gov/vuln/detail/CVE-2026-47781

Code Behaviors & Features

Detect and mitigate CVE-2026-47781 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.27.0

Fixed versions

  • 2.27.0

Solution

Upgrade to version 2.27.0 or above.

Impact 7.8 HIGH

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

pypi/pdm/CVE-2026-47781.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Fri, 12 Jun 2026 12:16:05 +0000.