Skip to main content
EPSS 0.1%top 97%

CVE-2026-47781: CWE-829: Inclusion of Functionality from Untrusted Control Sphere in pdm-project pdm

0
High
VulnerabilityCVE-2026-47781cvecve-2026-47781cwe-829cwe-94
Published: 08/04/2026 (08/04/2026, 18:42:23 UTC)
Source: CVE Database V5
Vendor/Project: pdm-project
Product: pdm

Description

PDM, a Python package and dependency manager, versions up to and including 2.26.9 automatically load project-local plugins from a .pdm-plugins directory during initialization. This behavior allows an attacker-controlled file in an untrusted repository checkout to execute arbitrary Python code before any command is parsed. The vulnerability arises because the load_plugins() function runs during Core.init() and adds .pdm-plugins via site.addsitedir(), which processes .pth files and executes import lines immediately. This code execution occurs with the privileges of the user running pdm, affecting even benign commands like pdm --version. The issue is fixed in version 2.27.0.

CVSS v4.0

Score 8.4high

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Active
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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 software

pdm-project

pdm

Affected versions
<2.27.0
pdm
pkg:pypi/pdm
Affected versions
<=2.26.9

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

AILast updated: 08/12/2026, 15:48:05 UTC

Technical Analysis

CVE-2026-47781 affects pdm-project's pdm tool, a Python package and dependency manager. In versions <=2.26.9, pdm automatically loads plugins from a .pdm-plugins directory during initialization by using site.addsitedir(), which processes .pth files and executes any import statements immediately. This allows an attacker who can place files in an untrusted repository checkout to execute arbitrary Python code with the privileges of the user invoking pdm. The vulnerability is triggered even by benign commands such as 'pdm --version', making it particularly impactful in automated or privileged environments. The vulnerability is classified under CWE-829 (Inclusion of Functionality from Untrusted Control Sphere) and CWE-94 (Code Injection). The issue is resolved in pdm version 2.27.0.

Potential Impact

An attacker with the ability to place files in a repository checkout can execute arbitrary Python code with the privileges of the user running pdm. This can lead to unauthorized code execution in local or automated environments such as CI pipelines. The vulnerability is triggered before any command parsing, including by non-destructive commands like 'pdm --version', increasing the risk in automated or privileged contexts.

Mitigation Recommendations

Upgrade pdm to version 2.27.0 or later, where this vulnerability is fixed. Until then, avoid running pdm commands in untrusted repository checkouts or environments where attacker-controlled files may exist. Patch status is confirmed fixed in version 2.27.0.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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

Threat ID: 6a7237f0bf8831d539488332

Added to database: 08/04/2026, 19:05:20 UTC

Last enriched: 08/12/2026, 15:48:05 UTC

Last updated: 09/18/2026, 10:01:31 UTC

Views: 53

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses