Skip to main content

In versions up to and including 2.26.9, PDM automatically loads project-local plugins from a .pdm-plugins directory during initialization, allowing… (CVE-2026-47781)

0
Medium
Published: 08/04/2026 (08/04/2026, 19:16:00 UTC)
Source: GCVE Database
Product: pdm

Description

PDM 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 with the privileges of the user running PDM. The vulnerability occurs because the load_plugins() function runs during Core.init() and adds the .pdm-plugins directory via site.addsitedir(), which processes .pth files and executes any import statements immediately. Even benign commands like 'pdm --version' trigger this code execution. The issue is fixed in version 2.27.0.

CVSS v4.0

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

Ubuntu:26.10more threats →ghsa
pdm
pkg:deb/ubuntu/pdm?arch=source&distro=stonking
Affected versions
=2.23.1-4=2.27.0-1=2.28.0-1=2.28.1-1
Ubuntu:26.04:LTSmore threats →ghsa
pdm
pkg:deb/ubuntu/pdm?arch=source&distro=resolute
Affected versions
=2.20.1+ds1-2=2.23.1-4

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: 10/18/2026, 01:08:22 UTC

Technical Analysis

PDM, a Python package and dependency manager, in versions up to and including 2.26.9, has a vulnerability where it automatically loads project-local plugins from a .pdm-plugins directory during initialization. This loading mechanism uses site.addsitedir(), which processes .pth files and executes any import statements found, leading to arbitrary Python code execution if an attacker controls files in the .pdm-plugins directory of an untrusted repository checkout. This code runs with the privileges of the user invoking PDM and is triggered even by simple commands such as 'pdm --version'. The vulnerability is resolved in version 2.27.0.

Potential Impact

An attacker who can place files in the .pdm-plugins directory of a project 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, especially impacting continuous integration (CI) systems or privileged contexts. The vulnerability is triggered during initialization before any command parsing, increasing the risk of exploitation.

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 that may contain malicious .pdm-plugins directories. There is no indication that other mitigations or workarounds are provided by the vendor.

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

Technical Details

Gcve Source
db.gcve.eu
Osv Id
UBUNTU-CVE-2026-47781
Osv Schema Version
1.7.0
Ecosystems
["Ubuntu:26.10","Ubuntu:26.04:LTS"]
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6ad3f6312cdf04f656664f08

Added to database: 10/17/2026, 22:26:57 UTC

Last enriched: 10/18/2026, 01:08:22 UTC

Last updated: 10/18/2026, 01:08:22 UTC

Views: 3

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