pdm: Project-Controlled `.pdm-plugins` Content Executes Before CLI Parsing
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Active
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-829.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| pdm-project | pdm | before 2.27.0 | 2.27.0 | Patch available | CNA |
| — | pdm (PyPI) | before 2.27.0 | 2.27.0 | Patch available | GHSA-qq6c-99pv-prvf |
- pdm Vendorpdm-project Affected before 2.27.0 Fixed in 2.27.0 Patch available CNA
- pdm (PyPI) Vendor— Affected before 2.27.0 Fixed in 2.27.0 Patch available GHSA-qq6c-99pv-prvf
Remediation
- Fix · CNA pdm (pdm-project) Fixed in 2.27.0
- Fix · GHSA-qq6c-99pv-prvf pdm (PyPI) Fixed in 2.27.0 Advisory →
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2026-47781
- 2026-10-03 Alias added: GHSA-qq6c-99pv-prvf
References
More pdm-project vulnerabilities
- TI-2026-35260 pdm: Project-Local State and Config Writes Follow Symlinks CVSS 4.0MEDIUM 6.8
- TI-2026-35261 pdm: Path traversal in wheel installation via overridden write_to_fs CVSS 4.0HIGH 8.4
Sources
- CVE-2026-47781 · CVE Program
- CVE-2026-47781 · NVD
- FIRST EPSS
- GHSA-qq6c-99pv-prvf · GitHub Advisory Database · CC BY 4.0
- CVE-2026-47781 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences