Skip to content

pdm

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?

ProductAffected versions (from the sources)Fixed in
pdmNiche>= 2.27.0, < 2.29.82.29.8

What to do

Update to a fixed version: 2.29.8.

Why this score

FactorValueEvidence×
ImpactFull compromiseCode execution or full control of the system or applicationFrom the CVSS vector1.00
Attacker positionLocalMust already run code or have a shell on the machineFrom the CVSS vector0.50
Privileges neededNoneNo accountFrom the CVSS vector1.00
Victim interactionRoutineA normal action: open a file, visit a page, click a linkFrom the CVSS vector0.70
ConfigurationDefaultOut-of-the-box installs are vulnerableFrom the CVSS vector1.00
ReliabilityHardNarrow race, needs an extra info leak, needs a man-in-the-middle position, or must be chained with another bugFrom the CVSS vector0.45

Threat level T1: Nothing known (× 0.85)

The default for a new disclosure

The arithmetic
  1. Prerequisites multiplied together0.158
  2. Threat T1: Nothing known0.850
  3. 10 × impact 1 × prerequisites 0.1575 × threat 0.851.339
  4. Rounded to one decimal between 0.1 and 101.3

How the score works

Exploitation and evidence timeline

  1. 2 Dec 2026 Published
  2. 2 Dec 2026 Risk 1.3 (cvss fallback)

Weakness

CWE-15, CWE-94

References

Get alerts for pdm

Free email or text alerts when a vulnerability in pdm reaches risk 8 or higher. Nothing else.