PDM: A project pdm.toml can still set cache_dir, which brings back project-controlled plugin code at pdm startup
- CVE-2026-141547
- GHSA-fv38-chg5-6pg2
- EUVD-2026-141814
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.
Text from the CVE.org record.
Recommendation
pdm
- If you run a version from 2.27.0 to before 2.29.8update to 2.29.8 or laterMinor version change: check the release notespdm 2.29.8 on its registry (opens in a new tab)
Taken from the version ranges the sources state. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.
Affected
pdm-project pdm
Affected versions Fixed in >= 2.27.0, < 2.29.8 none stated pdmPyPI
Affected versions Fixed in from 2.27.0 to before 2.29.8 2.29.8
Product versions from the CVE.org record.
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.