CVE-2026-47781
📛 CVE Title
pdm: Project-Controlled `.pdm-plugins` Content Executes Before CLI Parsing
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.
Overview
- State
- PUBLISHED
- Assigner (CNA)
- GitHub_M
- CVSS severity
- HIGH
- CVSS score
- 8.4 / 10
- CVSS 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- Effective score
- 8.4 / 10 HIGH source: CNA overview
- CWE(s)
-
CWE-829,CWE-94 - Reserved
- 2026-05-19
- Published
- 2026-08-04 18:42 UTC
- Last updated
- 2026-08-04 18:42 UTC
- Source
- https://raw.githubusercontent.com/CVEProject/cvelistV5/main/cves/2026/47xxx/CVE-2026-47781.json
- Linked Threat
- CVE-2026-47781 — pdm: Project-Controlled `.pdm-plugins` Content Executes Before CLI Parsing
Affected products (1)
| Vendor | Product | Versions | Platforms |
|---|---|---|---|
| pdm-project | pdm |
< 2.27.0 (affected)
|
— |
Vendor references (2)
References embedded in the original CVE record by the assigning CNA.
- https://github.com/pdm-project/pdm/security/advisories/GHSA-qq6c-99pv-prvf x_refsource_CONFIRM
- https://github.com/pdm-project/pdm/releases/tag/2.27.0 x_refsource_MISC
Web references (0)
DuckDuckGo results ranked by threat-intel / vendor advisory domains. Generated by the 🔎 Find references (web) button above — same flow as the Remediations search.
No web references attached yet.
AI Forensic Analysis
Only Available for Registered Users. Sign in to view.
Raw JSON
The full cvelistV5 record. Download as CVE-2026-47781.json.
{
"containers": {
"cna": {
"affected": [
{
"product": "pdm",
"vendor": "pdm-project",
"versions": [
{
"status": "affected",
"version": "< 2.27.0"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "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."
}
],
"metrics": [
{
"cvssV4_0": {
"attackComplexity": "LOW",
"attackRequirements": "NONE",
"attackVector": "LOCAL",
"baseScore": 8.4,
"baseSeverity": "HIGH",
"privilegesRequired": "NONE",
"subAvailabilityImpact": "NONE",
"subConfidentialityImpact": "NONE",
"subIntegrityImpact": "NONE",
"userInteraction": "ACTIVE",
"vectorString": "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",
"version": "4.0",
"vulnAvailabilityImpact": "HIGH",
"vulnConfidentialityImpact": "HIGH",
"vulnIntegrityImpact": "HIGH"
}
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-829",
"description": "CWE-829: Inclusion of Functionality from Untrusted Control Sphere",
"lang": "en",
"type": "CWE"
}
]
},
{
"descriptions": [
{
"cweId": "CWE-94",
"description": "CWE-94: Improper Control of Generation of Code ('Code Injection')",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-08-04T18:42:23.036Z",
"orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"shortName": "GitHub_M"
},
"references": [
{
"name": "https://github.com/pdm-project/pdm/security/advisories/GHSA-qq6c-99pv-prvf",
"tags": [
"x_refsource_CONFIRM"
],
"url": "https://github.com/pdm-project/pdm/security/advisories/GHSA-qq6c-99pv-prvf"
},
{
"name": "https://github.com/pdm-project/pdm/releases/tag/2.27.0",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/pdm-project/pdm/releases/tag/2.27.0"
}
],
"source": {
"advisory": "GHSA-qq6c-99pv-prvf",
"discovery": "UNKNOWN"
},
"title": "pdm: Project-Controlled `.pdm-plugins` Content Executes Before CLI Parsing"
}
},
"cveMetadata": {
"assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"assignerShortName": "GitHub_M",
"cveId": "CVE-2026-47781",
"datePublished": "2026-08-04T18:42:23.036Z",
"dateReserved": "2026-05-19T22:36:16.883Z",
"dateUpdated": "2026-08-04T18:42:23.036Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}