8.4
HIGH CVSS 4.0
CVE-2026-47781
pdm: Project-Controlled `.pdm-plugins` Content Executes Before CLI Parsing
Description

PDM is a Python package and dependency manager. In versions up to and including 2.26.9, PDM automatically loads project-local plugins from a .pdm-plugins directory during initialization, allowing an attacker-controlled file in an untrusted repository checkout to execute arbitrary Python code before any command is parsed. This happens because load_plugins() runs during Core.init() and adds .pdm-plugins via site.addsitedir(), which processes .pth files and immediately executes any line beginning with import, so the code runs with the privileges of the user invoking pdm and even a benign command such as pdm --version triggers it (making the impact strongest in CI, automation, and privileged contexts). The issue is fixed in version 2.27.0.

INFO

Published Date :

Aug. 4, 2026, 7:16 p.m.

Last Modified :

Oct. 24, 2026, 4:10 p.m.

Remotely Exploit :

No
Affected Products

The following products are affected by CVE-2026-47781 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Frostming pdm
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 134c704f-9b21-4f2e-91b3-4a467353bcc0
CVSS 4.0 HIGH [email protected]
Solution
Update PDM to version 2.27.0 or later to fix arbitrary code execution.
  • Update PDM to version 2.27.0.
  • Remove any untrusted .pdm-plugins directories.
  • Verify PDM configuration for plugin loading.
  • Scan repositories for malicious plugins.
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2026-47781.

URL Resource
https://github.com/pdm-project/pdm/releases/tag/2.27.0
https://github.com/pdm-project/pdm/security/advisories/GHSA-qq6c-99pv-prvf
https://github.com/pdm-project/pdm/security/advisories/GHSA-qq6c-99pv-prvf
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2026-47781 is associated with the following CWEs:

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2026-47781 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2026-47781 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Translated by [email protected]

    Oct. 24, 2026

    Action Type Old Value New Value
    Changed Translation Title: pdm de pdm-project, Description: PDM es un gestor de paquetes y dependencias de Python. En versiones hasta la 2.26.9 inclusive, PDM carga automáticamente plugins locales del proyecto desde un directorio .pdm-plugins durante la inicialización, permitiendo que un archivo controlado por un atacante en una copia de repositorio no confiable ejecute código Python arbitrario antes de que se analice cualquier comando. Esto sucede porque load_plugins() se ejecuta durante Core.init() y añade .pdm-plugins a través de site.addsitedir(), que procesa archivos .pth y ejecuta inmediatamente cualquier línea que comience con import, por lo que el código se ejecuta con los privilegios del usuario que invoca pdm e incluso un comando benigno como pdm --version lo activa (haciendo que el impacto sea más fuerte en CI, automatización y contextos privilegiados). El problema está solucionado en la versión 2.27.0. Title: pdm de pdm-project, Description: PDM es un gestor de paquetes y dependencias de Python. En versiones hasta la 2.26.9 inclusive, PDM carga automáticamente plugins locales del proyecto desde un directorio .pdm-plugins durante la inicialización, permitiendo que un archivo controlado por un atacante en una copia de repositorio no confiable ejecute código Python arbitrario antes de que se analice cualquier comando. Esto sucede porque load_plugins() se ejecuta durante Core.init() y añade .pdm-plugins a través de site.addsitedir(), que procesa archivos .pth y ejecuta inmediatamente cualquier línea que comience con import, por lo que el código se ejecuta con los privilegios del usuario que invoca pdm e incluso un comando benigno como pdm --version lo activa (haciendo que el impacto sea más fuerte en CI, automatización y contextos privilegiados). El problema está solucionado en la versión 2.27.0.
  • CVE Translated by [email protected]

    Oct. 23, 2026

    Action Type Old Value New Value
    Added Translation Title: pdm de pdm-project, Description: PDM es un gestor de paquetes y dependencias de Python. En versiones hasta la 2.26.9 inclusive, PDM carga automáticamente plugins locales del proyecto desde un directorio .pdm-plugins durante la inicialización, permitiendo que un archivo controlado por un atacante en una copia de repositorio no confiable ejecute código Python arbitrario antes de que se analice cualquier comando. Esto sucede porque load_plugins() se ejecuta durante Core.init() y añade .pdm-plugins a través de site.addsitedir(), que procesa archivos .pth y ejecuta inmediatamente cualquier línea que comience con import, por lo que el código se ejecuta con los privilegios del usuario que invoca pdm e incluso un comando benigno como pdm --version lo activa (haciendo que el impacto sea más fuerte en CI, automatización y contextos privilegiados). El problema está solucionado en la versión 2.27.0.
  • CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0

    Aug. 05, 2026

    Action Type Old Value New Value
    Added Reference https://github.com/pdm-project/pdm/security/advisories/GHSA-qq6c-99pv-prvf
    Added SSVC {'id': 'CVE-2026-47781', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'poc'}, {'automatable': 'yes'}, {'technicalImpact': 'total'}], 'version': '2.0.3', 'timestamp': '2026-08-05T13:48:06.311095Z'}
  • New CVE Received by [email protected]

    Aug. 04, 2026

    Action Type Old Value New Value
    Added Affected [{'vendor': 'pdm-project', 'product': 'pdm', 'versions': [{'status': 'affected', 'version': '< 2.27.0'}]}]
    Added Description PDM is a Python package and dependency manager. In versions up to and including 2.26.9, PDM automatically loads project-local plugins from a .pdm-plugins directory during initialization, allowing an attacker-controlled file in an untrusted repository checkout to execute arbitrary Python code before any command is parsed. This happens because load_plugins() runs during Core.init() and adds .pdm-plugins via site.addsitedir(), which processes .pth files and immediately executes any line beginning with import, so the code runs with the privileges of the user invoking pdm and even a benign command such as pdm --version triggers it (making the impact strongest in CI, automation, and privileged contexts). The issue is fixed in version 2.27.0.
    Added CVSS V4.0 AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
    Added CWE CWE-94
    Added CWE CWE-829
    Added Reference https://github.com/pdm-project/pdm/releases/tag/2.27.0
    Added Reference https://github.com/pdm-project/pdm/security/advisories/GHSA-qq6c-99pv-prvf
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.