Description
PDM is a Python package and dependency manager. From 2.27.0 until 2.29.8, a repository-controlled pdm.toml can override the global_only setting cache_dir because src/pdm/project/config.py enforces the restriction on writes but not when project configuration is read. In src/pdm/project/core.py, Project.config gives the project value precedence and project_plugins_dir is computed beneath the resulting cache directory. During Core.__init__ in src/pdm/core.py, load_plugins calls site.addsitedir on that directory's site-packages, processing executable .pth import lines before argument parsing. A malicious checkout can therefore execute Python code as the invoking user when PDM runs, including for pdm --version, if the prepared plugin directory matches the checkout path and Python version and PDM_CACHE_DIR is not set. This bypasses the earlier relocation of project plugins out of the checkout for CVE-2026-47781. This issue is fixed in version 2.29.8.
Published: 2026-12-02
Score: 7 High
EPSS: n/a
KEV: No
AI Analysis

Analysis and contextual insights are available on OpenCVE Cloud.

Remediation

No vendor fix or workaround currently provided.

Additional remediation guidance may be available on OpenCVE Cloud.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 02 Dec 2026 19:15:00 +0000

Type Values Removed Values Added
Description PDM is a Python package and dependency manager. From 2.27.0 until 2.29.8, a repository-controlled pdm.toml can override the global_only setting cache_dir because src/pdm/project/config.py enforces the restriction on writes but not when project configuration is read. In src/pdm/project/core.py, Project.config gives the project value precedence and project_plugins_dir is computed beneath the resulting cache directory. During Core.__init__ in src/pdm/core.py, load_plugins calls site.addsitedir on that directory's site-packages, processing executable .pth import lines before argument parsing. A malicious checkout can therefore execute Python code as the invoking user when PDM runs, including for pdm --version, if the prepared plugin directory matches the checkout path and Python version and PDM_CACHE_DIR is not set. This bypasses the earlier relocation of project plugins out of the checkout for CVE-2026-47781. This issue is fixed in version 2.29.8.
Title PDM: A project pdm.toml can still set cache_dir, which brings back project-controlled plugin code at pdm startup
Weaknesses CWE-15
CWE-94
References
Metrics cvssV3_1

{'score': 7, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-12-02T18:58:22.343Z

Reserved: 2026-12-01T21:16:36.622Z

Link: CVE-2026-141547

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-12-02T19:18:01.557

Modified: 2026-12-02T19:18:01.557

Link: CVE-2026-141547

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

No data.

Weaknesses
  • CWE-15

    External Control of System or Configuration Setting

  • CWE-94

    Improper Control of Generation of Code ('Code Injection')