PT-2026-48681 · Pypi · Pdm

CVE-2026-47781

·

Published

2026-06-11

·

Updated

2026-08-04

CVSS v4.0

8.4

High

VectorAV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Name of the Vulnerable Software and Affected Versions PDM versions prior to 2.28.0
Description PDM automatically loads project-local plugin paths from .pdm-plugins during Core initialization. This process uses site.addsitedir(), which on CPython processes .pth files in the added directory. If a .pth file contains lines beginning with import , that code is executed immediately. This allows an attacker to achieve arbitrary code execution with the privileges of the user running pdm when the user executes any command, such as pdm --version, from an untrusted repository checkout. The issue is particularly critical in CI environments, privileged shells, and automation contexts, potentially leading to credential theft, persistence, or privilege escalation if run via sudo or root-owned accounts.
Recommendations Update to version 2.28.0 or later. As a temporary workaround, avoid running pdm commands within untrusted repository checkouts. Restrict the use of project-local .pdm-plugins by ensuring they are not auto-loaded by default.

Exploit

Fix

Code Injection

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

CVE-2026-47781
GHSA-QQ6C-99PV-PRVF
OPENSUSE-SU-2026:11124-1
OPENSUSE-SU-2026:21161-1
PYSEC-2026-2863

Affected Products

Pdm