Skip to content
High 7.0

PDMにリポジトリの設定で任意のPythonコードを実行される脆弱性

CVE-2026-141547 First seen on SecPulse

Summary

PDMの2.27.0から2.29.7までの版では、リポジトリ内のpdm.tomlでcache_dirを上書きでき、PDMの起動時に悪意あるコードが実行されるおそれがあります。pdm --versionなどの実行でも影響するとされ、修正版の2.29.8で対応しています。2.29.8以上へ更新してください。

AI summary

Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.

PDMの2.27.0から2.29.7までの版では、リポジトリ内のpdm.tomlでcache_dirを上書きでき、PDMの起動時に悪意あるコードが実行されるおそれがあります。pdm --versionなどの実行でも影響するとされ、修正版の2.29.8で対応しています。2.29.8以上へ更新してください。

Original description The description as published by the source.

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.

Source: CVE.org (CVE Program・cvelistV5) NVD

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details