pdm: Project-Controlled `.pdm-plugins` Content Executes Before CLI Parsing
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-47781
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 8 Nov 2026, 00:18 UTC · Revision 1
Source evidence
pdm: Project-Controlled `.pdm-plugins` Content Executes Before CLI Parsing
core-osv · Original sourcePublished 4 Aug 2026, 18:42 UTC
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.
osv:CVE-2026-47781
Complete source record
{
"id": "10545f606c45bebbe1538dba9fa10b605cf3188bbc24651f2a296270f71f0ecb",
"url": "https://osv.dev/vulnerability/CVE-2026-47781",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "pdm: Project-Controlled `.pdm-plugins` Content Executes Before CLI Parsing",
"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.",
"evidence": "osv:CVE-2026-47781",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2026-47781",
"aliases": [
"CVE-2026-47781",
"GHSA-qq6c-99pv-prvf",
"PYSEC-2026-2863"
],
"metrics": [
{
"type": "CVSS_V4",
"score": "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"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/pdm-project/pdm",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "09c95b7842844f4e857c88f669e1c666db405c71"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "2.27.0"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"fixed": "09c95b7842844f4e857c88f669e1c666db405c71"
}
],
"source": "REFERENCES_TAG",
"original_tag": "2.27.0"
}
]
}
}
],
"versions": [
"2.26.9",
"2.26.8",
"2.26.7",
"2.26.6",
"2.26.5",
"2.26.4",
"2.26.3",
"2.26.2",
"2.26.1",
"2.26.0",
"2.25.9",
"2.25.8",
"2.25.7",
"2.25.6",
"2.25.5",
"2.25.4",
"2.25.3",
"2.25.2",
"2.25.1",
"2.25.0",
"2.24.2",
"2.24.1",
"2.24.0",
"2.23.1",
"2.23.0",
"2.22.4",
"2.22.3",
"2.22.2",
"2.22.1",
"2.22.0",
"2.21.0",
"2.20.1",
"2.20.0.post1",
"2.20.0",
"2.19.3",
"2.19.2",
"2.19.1",
"2.19.0",
"2.18.2",
"2.18.1",
"2.18.0",
"2.17.3",
"2.17.2",
"2.17.1",
"2.17.0",
"2.16.1",
"2.16.0",
"2.15.4",
"2.15.3",
"2.15.2",
"2.15.1",
"2.15.0",
"2.14.0",
"2.13.3",
"2.13.2",
"2.13.1",
"2.13.0",
"2.12.4",
"2.12.3",
"2.12.2",
"2.12.1",
"2.12.0",
"2.11.2",
"2.11.1",
"2.11.0",
"2.10.4",
"2.10.3",
"2.10.2",
"2.10.1",
"2.10.0",
"2.9.3",
"2.9.2",
"2.9.1",
"2.9.0",
"2.8.2",
"2.8.1",
"2.8.0",
"2.8.0a2",
"2.8.0a1",
"2.8.0a0",
"2.7.4",
"2.7.3",
"2.7.2",
"2.7.1",
"2.7.0",
"2.6.1",
"2.6.0",
"2.5.3",
"2.5.2",
"2.5.1",
"2.5.0",
"2.5.0b0",
"2.4.9",
"2.4.8",
"2.4.7",
"2.4.6",
"2.4.5",
"2.4.4",
"2.4.3",
"2.4.2",
"2.4.1",
"2.4.0",
"2.3.4",
"2.3.3",
"2.3.2",
"2.3.1",
"2.3.0",
"2.2.1",
"2.2.0",
"2.1.5",
"2.1.4",
"2.1.3",
"2.1.2",
"2.1.1",
"2.1.0",
"1.15.4",
"2.0.3",
"2.0.2",
"2.0.1",
"2.0.0",
"2.0.0b2",
"2.0.0b1",
"2.0.0a1",
"1.15.3",
"1.15.2",
"1.15.1",
"1.15.0",
"1.14.1",
"1.14.0",
"1.13.6",
"1.13.5",
"1.13.4",
"1.13.3",
"1.13.2",
"1.13.1",
"1.13.0.post0",
"1.13.0",
"1.12.8",
"1.12.7",
"1.12.6",
"1.12.5",
"1.12.4",
"1.12.3",
"1.12.2",
"1.12.1",
"1.12.0",
"1.11.3",
"1.11.2",
"1.11.1",
"1.11.0",
"1.10.3",
"1.10.2",
"1.10.1",
"1.10.0",
"1.9.0",
"1.8.5",
"1.8.4",
"1.8.3",
"1.8.2",
"1.8.1",
"1.8.0",
"1.7.2",
"1.7.1",
"1.7.0",
"1.6.4",
"1.6.3",
"1.6.2",
"1.6.1",
"1.6.0",
"1.5.3",
"1.5.2",
"1.5.1",
"1.5.0",
"1.5.0b1",
"1.5.0b0",
"1.4.5",
"1.4.4",
"1.4.3",
"1.4.2",
"1.4.1",
"1.4.0",
"1.3.4",
"1.3.3",
"1.3.2",
"1.3.1",
"1.3.0",
"1.2.0post1",
"1.2.0",
"1.1.0",
"1.0.0",
"1.0.0b2",
"1.0.0b0",
"0.12.3",
"0.12.2",
"0.12.1",
"0.12.0",
"0.11.0",
"0.10.2",
"0.10.1",
"0.10.0",
"0.9.2",
"0.9.1",
"0.9.0",
"0.8.7",
"0.8.6",
"0.8.5",
"0.8.4",
"0.8.3",
"0.8.2",
"0.8.1",
"0.8.0",
"0.7.1",
"0.7.0",
"0.6.5",
"0.6.4",
"0.6.3",
"0.6.2",
"0.6.1",
"0.6.0",
"0.5.0",
"0.4.2",
"0.4.1",
"0.4.0",
"0.3.2",
"0.3.1",
"0.3.0",
"0.2.6",
"0.2.5",
"0.2.4",
"0.2.3",
"0.2.2",
"0.2.1",
"0.2.0",
"0.1.2",
"0.1.1",
"0.1.0",
"0.0.6",
"0.0.5",
"0.0.4",
"0.0.3",
"0.0.2",
"0.0.1"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-47781.json"
}
}
],
"modified": "2026-10-28T02:30:51.947506125Z",
"provider": "osv",
"references": [
"https://github.com/pdm-project/pdm/releases/tag/2.27.0",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/47xxx/CVE-2026-47781.json",
"https://github.com/pdm-project/pdm/security/advisories/GHSA-qq6c-99pv-prvf",
"https://nvd.nist.gov/vuln/detail/CVE-2026-47781"
],
"provider_metadata": {
"cwe_ids": [
"CWE-829",
"CWE-94"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/47xxx/CVE-2026-47781.json"
}
},
"related_cves": [
{
"value": "CVE-2026-47781",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 520909,
"published_at": "2026-08-04T18:42:23.036+00:00"
}