CVE-2026-47781
Received Received - Intake

Arbitrary Code Execution in PDM Dependency Manager

Vulnerability report for CVE-2026-47781, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-04

Last updated on: 2026-08-04

Assigner: GitHub, Inc.

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-04
Last Modified
2026-08-04
Generated
2026-08-04
AI Q&A
2026-08-04
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 4 associated CPEs
Vendor Product Version / Range
pdm pdm to 2.26.9 (inc)
pdm pdm 2.27.0
pdm_project pdm to 2.26.9 (inc)
pdm_project pdm 2.27.0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-94 The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
CWE-829 The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Detection Guidance

Check for the presence of a .pdm-plugins directory in PDM project directories. Review any .pth files in that directory for suspicious import statements. Commands like find /path/to/project -name '.pdm-plugins' -type d or grep -r 'import' /path/to/project/.pdm-plugins/ may help identify potential exploitation attempts.

Mitigation Strategies

Upgrade PDM to version 2.27.0 or later immediately. Avoid running PDM in untrusted directories or CI environments until updated. Disable auto-loading of project-local plugins if possible by reviewing PDM configuration files.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-47781. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart