CVE-2026-47781: CWE-829: Inclusion of Functionality from Untrusted Control Sphere in pdm-project pdm
PDM, a Python package and dependency manager, has a vulnerability in versions up to and including 2.26.9 where it automatically loads project-local plugins from a .pdm-plugins directory during initialization. This allows an attacker-controlled file in an untrusted repository to execute arbitrary Python code with the privileges of the user running PDM. The vulnerability is triggered even by benign commands such as 'pdm --version'. The issue is fixed in version 2.27.0.
AI Analysis
Technical Summary
CVE-2026-47781 describes a code execution vulnerability in pdm-project's PDM tool. Versions up to and including 2.26.9 automatically load plugins from a .pdm-plugins directory during Core.init(), using site.addsitedir() which processes .pth files and executes import statements immediately. This behavior allows an attacker who can place files in an untrusted repository checkout to execute arbitrary Python code before any command parsing, running with the user's privileges. The vulnerability is particularly impactful in CI, automation, and privileged contexts. The flaw is resolved in version 2.27.0.
Potential Impact
An attacker able to place malicious files in a repository checked out by PDM can achieve arbitrary code execution with the privileges of the user running PDM. This can occur even when running non-malicious commands such as 'pdm --version', increasing risk in automated or privileged environments.
Mitigation Recommendations
Upgrade to PDM version 2.27.0 or later, where this vulnerability is fixed. Until upgrading, avoid running PDM commands in untrusted repository checkouts or environments where untrusted .pdm-plugins directories may exist.
CVE-2026-47781: CWE-829: Inclusion of Functionality from Untrusted Control Sphere in pdm-project pdm
Description
PDM, a Python package and dependency manager, has a vulnerability in versions up to and including 2.26.9 where it automatically loads project-local plugins from a .pdm-plugins directory during initialization. This allows an attacker-controlled file in an untrusted repository to execute arbitrary Python code with the privileges of the user running PDM. The vulnerability is triggered even by benign commands such as 'pdm --version'. The issue is fixed in version 2.27.0.
CVSS v4.0
Score 8.4high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-47781 describes a code execution vulnerability in pdm-project's PDM tool. Versions up to and including 2.26.9 automatically load plugins from a .pdm-plugins directory during Core.init(), using site.addsitedir() which processes .pth files and executes import statements immediately. This behavior allows an attacker who can place files in an untrusted repository checkout to execute arbitrary Python code before any command parsing, running with the user's privileges. The vulnerability is particularly impactful in CI, automation, and privileged contexts. The flaw is resolved in version 2.27.0.
Potential Impact
An attacker able to place malicious files in a repository checked out by PDM can achieve arbitrary code execution with the privileges of the user running PDM. This can occur even when running non-malicious commands such as 'pdm --version', increasing risk in automated or privileged environments.
Mitigation Recommendations
Upgrade to PDM version 2.27.0 or later, where this vulnerability is fixed. Until upgrading, avoid running PDM commands in untrusted repository checkouts or environments where untrusted .pdm-plugins directories may exist.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-05-19T22:36:16.883Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a7237f0bf8831d539488332
Added to database: 08/04/2026, 19:05:20 UTC
Last enriched: 08/04/2026, 19:11:43 UTC
Last updated: 08/04/2026, 19:44:55 UTC
Views: 5
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.