PDM: A project pdm.toml can still set cache_dir, which brings back project-controlled plugin code at pdm startup
CVE-2026-141547Published 2 Dec 2026, 18:58 UTC
Real-world risk
1.3/ 10Low
Routine
PreliminaryFrom the CVSS vector only · confidence low
CVSS
7.0
scored by the vendor (CNA), CVSS 3.1
In plain words
No plain-language summary yet. The original description is below.
Original description (from GitHub_M)
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.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| pdmNiche | >= 2.27.0, < 2.29.8 | 2.29.8 |
What to do
Update to a fixed version: 2.29.8.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | Full compromiseCode execution or full control of the system or application | From the CVSS vector | 1.00 |
| Attacker position | LocalMust already run code or have a shell on the machine | From the CVSS vector | 0.50 |
| Privileges needed | NoneNo account | From the CVSS vector | 1.00 |
| Victim interaction | RoutineA normal action: open a file, visit a page, click a link | From the CVSS vector | 0.70 |
| Configuration | DefaultOut-of-the-box installs are vulnerable | From the CVSS vector | 1.00 |
| Reliability | HardNarrow race, needs an extra info leak, needs a man-in-the-middle position, or must be chained with another bug | From the CVSS vector | 0.45 |
Threat level T1: Nothing known (× 0.85)
The default for a new disclosure
The arithmetic
- Prerequisites multiplied together0.158
- Threat T1: Nothing known0.850
- 10 × impact 1 × prerequisites 0.1575 × threat 0.851.339
- Rounded to one decimal between 0.1 and 101.3
Exploitation and evidence timeline
- 2 Dec 2026 Published
- 2 Dec 2026 Risk 1.3 (cvss fallback)
Weakness
CWE-15, CWE-94