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

- Severity: High 8.4 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.19%, higher than 8% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-06-11T13:25:28.000Z
- Modified: 2026-10-24T16:10:00.153Z
- Also known as: GHSA-qq6c-99pv-prvf, PYSEC-2026-2863
- Weaknesses: CWE-94, CWE-829
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- pdm-project pdm: < 2.27.0
- pdm (PyPI): before 2.27.0

## Every score

- GitHub_M: CVSS:4.0 8.4 High `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`
- GitHub: CVSS:4.0 High `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`
- PyPA Advisory Database: CVSS:4.0 `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`

## References

- <https://github.com/pdm-project/pdm/security/advisories/GHSA-qq6c-99pv-prvf> (exploit, web)
- <https://github.com/pdm-project/pdm/releases/tag/2.27.0> (web)
- <https://github.com/pdm-project/pdm> (package)
- <https://pypi.org/project/pdm> (package)
- <https://github.com/advisories/GHSA-qq6c-99pv-prvf> (advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-47781> (advisory)

## Sources

- CVE List: [CVE-2026-47781](https://www.cve.org/CVERecord?id=CVE-2026-47781), CVE Terms of Use, modified 2026-08-05
- GitHub Advisory Database: [GHSA-qq6c-99pv-prvf](https://github.com/advisories/GHSA-qq6c-99pv-prvf), CC-BY-4.0, modified 2026-07-13
- NVD: [CVE-2026-47781](https://nvd.nist.gov/vuln/detail/CVE-2026-47781), Public domain, modified 2026-10-24
- PyPA Advisory Database: [PYSEC-2026-2863](https://osv.dev/vulnerability/PYSEC-2026-2863), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-47781 · Whole record: https://cve.day/CVE-2026-47781.json · Rebuilt by cve.day 2026-11-25T22:59:31.003Z
