{"id":"CVE-2026-47781","published":"2026-08-04T18:42:23Z","modified":"2026-08-05T13:48:50Z","title":"pdm: Project-Controlled `.pdm-plugins` Content Executes Before CLI Parsing","vendor":"pdm-project","product":"pdm","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.4,"severity":"HIGH","version":"4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00187,"percentile":0.08519,"provenance":"source"},"cwes":[{"id":"CWE-829","name":"Inclusion of Functionality from Untrusted Control Sphere"},{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://github.com/pdm-project/pdm/security/advisories/GHSA-qq6c-99pv-prvf","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/pdm-project/pdm/releases/tag/2.27.0","tags":["x_refsource_MISC"]}],"priority":{"score":7.6,"factors":[{"name":"EPSS percentile","points":1.7},{"name":"CVSS severity","points":5.88}]},"vendorSlug":"pdm-project","affectedVersions":[{"vendor":"pdm-project","product":"pdm","versions":["< 2.27.0"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"total","timestamp":"2026-08-05T13:48:06.311095Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"pdm","vulnerableRanges":["<2.27.0"],"patched":["2.27.0"],"from":["GHSA-qq6c-99pv-prvf","PYSEC-2026-2863"],"provenance":"source"}],"summary":{"text":"PDM, a Python package and dependency manager, automatically loads project-local plugins from a .pdm-plugins directory during initialization, so a file placed there in a repository checkout is trusted without any check. An attacker able to supply such a file in an untrusted repository can get arbitrary Python code executed with the privileges of the user running pdm, and this happens with no authentication and only user interaction in the form of running any pdm command, even a benign one such as pdm --version, in that checkout.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:11:12Z"},"euvd":{"id":"EUVD-2026-52867","exploited":false,"provenance":"source"}}