{"id":"CVE-2026-141547","summary":"PDM: A project pdm.toml can still set cache_dir, which brings back project-controlled plugin code at pdm startup","details":"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.","aliases":["GHSA-fv38-chg5-6pg2"],"modified":"2026-12-03T00:45:37.499754490Z","published":"2026-12-02T18:58:22.343Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/141xxx/CVE-2026-141547.json","cna_assigner":"GitHub_M","cwe_ids":["CWE-15","CWE-94"]},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/141xxx/CVE-2026-141547.json"},{"type":"FIX","url":"https://github.com/pdm-project/pdm/commit/8cfea30571b0694dacbc7c5e4459527f83a4c4cc"},{"type":"WEB","url":"https://github.com/pdm-project/pdm/releases/tag/2.29.8"},{"type":"ADVISORY","url":"https://github.com/pdm-project/pdm/security/advisories/GHSA-fv38-chg5-6pg2"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-141547"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/pdm-project/pdm","events":[{"introduced":"09c95b7842844f4e857c88f669e1c666db405c71"},{"fixed":"13e42d73b045aa5d996cdfb442d0bd0cfd0c7344"},{"fixed":"8cfea30571b0694dacbc7c5e4459527f83a4c4cc"}],"database_specific":{"extracted_events":[{"source":"AFFECTED_FIELD","strategy":"StringRangeExpression","range":[{"introduced":"2.27.0"},{"fixed":"2.29.8"}]},{"range":[{"fixed":"8cfea30571b0694dacbc7c5e4459527f83a4c4cc"}],"source":"REFERENCES_COMMIT"},{"source":"REFERENCES_TAG","original_tag":"2.29.8","range":[{"fixed":"13e42d73b045aa5d996cdfb442d0bd0cfd0c7344"}]}]}}],"versions":["2.29.7","2.29.6","2.29.5","2.29.4","2.29.3","2.29.2","2.29.1","2.29.0","2.28.2","2.28.1","2.28.0","2.27.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-141547.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H"}]}