Description
pdm is a Python package and dependency manager supporting the latest PEP standards. In versions prior to 2.27.0, pdm writes several project-local state or configuration files without symlink protection. If a malicious repository places those files as symlinks, local PDM operations can overwrite the symlink targets. This creates an arbitrary file clobber primitive relative to the privileges of the invoking user. Config.__init__() resolves the project-local pdm.toml path and _save_config() writes to the resolved target. If PROJECT_ROOT/pdm.toml is a symlink to another file, pdm config -l ... updates the target file instead of refusing the write.
The same general problem exists for other project-local persistence paths that are written directly with no lstat / O_NOFOLLOW protection. For the pdm.toml PoC specifically, the target file must already contain parseable TOML. Otherwise the load step fails before the write path is reached. That parser constraint does not apply to the .pdm-python or .python-version sinks. This issue has been fixed in version 2.27.0.
Published: 2026-08-04
Score: 6.8 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

PDM writes project‑local state and configuration files without protecting against symlink traversal. In affected releases before 2.27.0, the program resolves paths such as pdm.toml, .pdm‑python, or .python‑version and writes directly to the resolved target without checking whether the path is a symbolic link. This flaw allows an attacker to produce a repository that contains symlinks pointing to arbitrary files; when PDM performs a state write during normal operation, it will follow the link and overwrite the target file, thereby clobbering that file with user‑supplied data. The root cause is a path‑traversal weakness (CWE‑61) that manifests as arbitrary file clobbering at the user’s privilege level.

Affected Systems

PDM, version 2.26.x and earlier, is affected by this vulnerability. All installations using a release older than 2.27.0 lack symlink protection during configuration writes and therefore are susceptible. The issue is resolved in release 2.27.0 and later.

Risk and Exploitability

The CVSS score of 6.8 indicates moderate severity. EPSS data is not available, and the vulnerability is not listed in the CISA KEV catalog. Exploitation requires a malicious repository that contains at least one symlink to a target file that the attacker can modify. The attacker typically obtains the repository or injects it into an existing one; then any routine PDM command that triggers a state write (for example, pdm config -l …) will cause the overwrite. The impact remains local to the user account running PDM; however, overwriting key project files such as configuration or interpreter selection can disrupt builds, break dependencies, or in extreme cases cause deceptive behavior if the overwritten file is executed. The attack vector is inferred from the description rather than explicitly stated in the CVE entry. Because the flaw requires local write access to the target file and only operates within the project directory, a system‑wide compromise would be unlikely without additional privileges.

Generated by OpenCVE AI on August 4, 2026 at 19:49 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade PDM to version 2.27.0 or later, which implements symlink‑following protection for project‑local writes.
  • Verify that any repository you use with PDM does not contain unintended symlinks; consider pre‑processing or sanitizing the repository metadata before installing.
  • Use isolated environments, such as virtual environments or dedicated directories, so that a potential file overwrite is confined to a non‑critical context.

Generated by OpenCVE AI on August 4, 2026 at 19:49 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-ghq2-5c67-fprm PDM: Project-Local State and Config Writes Follow Symlinks
History

Wed, 05 Aug 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 05 Aug 2026 10:45:00 +0000

Type Values Removed Values Added
First Time appeared Pdm-project
Pdm-project pdm
Vendors & Products Pdm-project
Pdm-project pdm

Tue, 04 Aug 2026 17:45:00 +0000

Type Values Removed Values Added
Description pdm is a Python package and dependency manager supporting the latest PEP standards. In versions prior to 2.27.0, pdm writes several project-local state or configuration files without symlink protection. If a malicious repository places those files as symlinks, local PDM operations can overwrite the symlink targets. This creates an arbitrary file clobber primitive relative to the privileges of the invoking user. Config.__init__() resolves the project-local pdm.toml path and _save_config() writes to the resolved target. If PROJECT_ROOT/pdm.toml is a symlink to another file, pdm config -l ... updates the target file instead of refusing the write. The same general problem exists for other project-local persistence paths that are written directly with no lstat / O_NOFOLLOW protection. For the pdm.toml PoC specifically, the target file must already contain parseable TOML. Otherwise the load step fails before the write path is reached. That parser constraint does not apply to the .pdm-python or .python-version sinks. This issue has been fixed in version 2.27.0.
Title pdm: Project-Local State and Config Writes Follow Symlinks
Weaknesses CWE-61
References
Metrics cvssV4_0

{'score': 6.8, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-05T15:00:39.192Z

Reserved: 2026-05-19T22:36:16.881Z

Link: CVE-2026-47763

cve-icon Vulnrichment

Updated: 2026-08-05T15:00:32.866Z

cve-icon NVD

Status : Received

Published: 2026-08-04T18:16:52.107

Modified: 2026-08-05T16:16:56.863

Link: CVE-2026-47763

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-05T10:19:31Z

Weaknesses
  • CWE-61

    UNIX Symbolic Link (Symlink) Following