Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAttacker publishes malicious repo with symlinks
-
DeliveryVictim clones repo locally
-
ExploitVictim runs pdm config or pdm use command
-
ExecutionPDM resolves project-local path without lstat check
-
PersistWrite follows symlink to target file
-
ImpactTarget file outside repo root is clobbered
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling UNIX symlink resolution
|
| Exploitation Conditions | Exploitation requires three concrete conditions: (1) the victim must clone or otherwise obtain an attacker-controlled project directory containing a symlink placed at pdm.toml, .pdm-python, or .python-version pointing to an arbitrary target file; (2) the victim must actively run a PDM command that triggers a project-local config or state write - specifically commands such as 'pdm config -l', 'pdm use', or any operation that persists project-local state; (3) for the pdm.toml sink only, the symlink target file must already contain parseable TOML, or the load step will fail before the write occurs (this constraint does not apply to .pdm-python or .python-version). Exploitation is limited by the local attack vector - the attacker cannot exploit this remotely without the victim first cloning the repository. The impact is bounded by the privileges of the invoking user: if PDM is run as a standard developer account, only files writable by that user can be clobbered; if run in a privileged CI context, the blast radius is larger. No special software configuration on the victim system is required beyond having a vulnerable version of PDM installed. |
| Impact | The CVSS v4.0 score of 6.8 (Medium) with vector CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:L accurately reflects the constrained but real impact. The local attack vector (AV:L) and required user interaction (UI:A - victim must actively run a PDM command) significantly limit the attack surface compared to a remote or zero-click vulnerability. However, the No Privileges Required (PR:N) metric is accurate because the attacker only needs to publish or share a malicious repository; they require no system access to the victim machine. The High Integrity impact (VI:H) is meaningful: arbitrary files writable by the invoking user can be clobbered, which is a serious primitive if PDM is run in CI/CD pipelines, build systems, or with elevated privileges. No EPSS score is available in the provided data. The vulnerability is NOT in CISA KEV, indicating no confirmed mass exploitation. A working PoC is publicly available in the advisory, which materially increases the practical risk over a theoretical finding. The tag 'RCE' in the intelligence metadata is misleading - this is a file clobber primitive, not remote code execution, though file clobber can serve as a stepping stone to code execution in privileged contexts. Real-world risk is moderate for developers working with untrusted repositories and elevated for automated build pipelines running PDM with heightened privileges. |
| Exploit ScenarioDerived | An attacker publishes or shares a malicious Python repository that includes a pdm.toml or .python-version file replaced with a symlink pointing to a sensitive file on the victim's system (e.g., ~/.ssh/config or a CI runner's credential file) that already contains parseable TOML where required. When a developer or automated CI pipeline clones the repository and runs a routine PDM command such as 'pdm config -l venv.in_project false' or 'pdm use', PDM follows the symlink and overwrites the target file with attacker-influenced configuration content, corrupting or destroying it. A working proof-of-concept demonstrating this exact flow is included in the GitHub advisory GHSA-ghq2-5c67-fprm. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 10, 2026
Arbitrary file clobber in PDM (Python Development Master) below version 2.27.0 allows an attacker who controls a cloned project repository to overwrite files outside the repository root by planting symlinks at project-local config paths (pdm.toml, .pdm-python, .python-version) that PDM writes to without symlink protection. When a developer runs any PDM command triggering a project-local config write against the malicious checkout, the tool follows the symlink and overwrites the target with attacker-influenced content - up to arbitrary file corruption relative to the invoking user's privileges. A working proof-of-concept is included in the GitHub security advisory GHSA-ghq2-5c67-fprm; no active exploitation is confirmed in CISA KEV at time of analysis.
RemediationAI
Upgrade PDM to version 2.27.0 or later; this is the vendor-released patch that explicitly refuses to write project-local config and state files (pdm.toml, .pdm-python, .python-version) when the destination is a symlink. The fix is confirmed in the release notes at https://github.com/pdm-project/pdm/releases/tag/2.27.0 (issue #3788) and the security advisory GHSA-ghq2-5c67-fprm at https://github.com/pdm-project/pdm/security/advisories/GHSA-ghq2-5c67-fprm. For environments where immediate upgrade is not possible, the primary compensating control is to avoid running PDM commands (especially pdm config -l or pdm use) inside untrusted or externally-sourced repository checkouts. In CI/CD pipelines running PDM with elevated privileges, restrict which repositories are checked out and ensure workspace directories are freshly initialized rather than reused across builds, which eliminates the attacker's ability to pre-place symlinks. Note that these workarounds are operationally constraining and do not address the root cause - upgrading to 2.27.0 is strongly preferred.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
PDM is a Python package and dependency manager distributed via pip (pkg:pip/pdm). The root cause is CWE-61 (UNIX Symbolic Link Following): project-local file sinks - specifically pdm.toml (handled in src/pdm/project/config.py:303-350 via Config.__init__() and _save_config()), .pdm-python (src/pdm/project/core.py:209-217), and .python-version (src/pdm/cli/commands/use.py:187-189) - are treated as trusted regular files. PDM resolves these paths and writes to the resolved destination without first calling lstat() to verify the path is not a symlink, and without using O_NOFOLLOW or atomic temp-file replacement guarded by a regular-file check. For the pdm.toml sink, an additional constraint exists: the symlink target must contain parseable TOML for the load step to succeed before the write path is reached. This constraint does not apply to .pdm-python or .python-version, making those sinks more reliably exploitable. The vulnerability is classified under CWE-61 and is architecturally equivalent to well-known TOCTOU symlink-following bugs in Unix tooling.
Know when Python gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Local vector and required user interaction reflect that victim must run PDM against an attacker-controlled checkout; PR:N because attacker needs no system privileges, only a shared repository; no confidentiality impact as only a write primitive is demonstrated.
Primary rating from Vendor (https://github.com/pdm-project/pdm).
CVSS VectorVendor: https://github.com/pdm-project/pdm
Lifecycle Timeline
1DescriptionCVE.org
Summary
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.
Affected Behavior
- Project-local config writes can affect files outside the repository
- The most stable demonstrated sink is
pdm.toml - Related sinks include
.pdm-pythonand.python-version
Affected Code
src/pdm/project/config.py:303-350src/pdm/project/core.py:209-217src/pdm/cli/commands/use.py:187-189
Technical Details
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.
Impact
- Arbitrary file clobber as the invoking user
- Destructive modification of local files outside the repository root
- Useful primitive for privilege abuse when
pdmis run in elevated contexts
Reproduction
PoC:
# Replace this with a Python interpreter that can run `python -m pdm`.
PDM_PY=/path/to/python-with-pdm
tmpdir=$(mktemp -d)
target="$tmpdir/clobbered-target.toml"
cat > "$target" <<'EOF'
[seed]
value = 1
EOF
ln -s "$target" "$tmpdir/pdm.toml"
cat > "$tmpdir/pyproject.toml" <<'EOF'
[project]
name = "symlink-clobber-demo"
version = "0.0.1"
EOF
(
cd "$tmpdir" &&
"$PDM_PY" -m pdm config -l venv.in_project false
)
cat "$target"Expected result:
- A temporary project is created
pdm.tomlis a symlink to another TOML file- Running
pdm config -l venv.in_project falsemodifies the symlink target
Observed output from local validation:
--- target ---
[seed]
value = 1
[venv]
in_project = falseSeverity
Medium
CVSS v4.0
- Base score:
6.8(Medium) - 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
Rationale:
AV:L: exploitation requires local execution ofpdmagainst an attacker-prepared checkoutAC:L: there is no complex constraint once the symlink sink existsAT:N: no extra prerequisite beyond the victim running the relevant command is requiredPR:N: the attacker does not need prior privileges on the victim systemUI:A: the victim must actively run a command that writes project-local state or configVC:N: the demonstrated issue is a write primitive, not a direct read primitiveVI:H: the attacker can cause unauthorized modification of files outside the repository rootVA:L: file clobber can disrupt local operation, but direct same-step availability impact is lower than a full RCESC:N/SI:N/SA:N: the base score is limited to the directly affected system
Root Cause
Project-local file sinks are treated as trusted regular files and are written without symlink checks or guarded atomic replacement.
Recommended Remediation
- Refuse to write project-local config/state files when the destination is a symlink
- Use
lstatandO_NOFOLLOWwhere available - Avoid resolving attacker-controlled project-local paths before writing
- Use atomic temp-file replacement only after confirming the destination is a regular file
Disclosure Notes
This issue is independent from the code-execution issues above. It is best tracked as a separate CVE candidate because the root cause and remediation are different.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
Same weakness CWE-61 – UNIX Symbolic Link (Symlink) Following
View allVendor StatusVendor
SUSE
Severity: Moderate| Product | Status |
|---|---|
| openSUSE Tumbleweed | Fixed |
EUVD-2026-52807
GHSA-ghq2-5c67-fprm
NVD
CVE.org
EPSS
VulDB
Exploit-DB