PDM wheel and project-local file-write boundaries¶
Source: hourly offensive-security scan, 2026-06-10. Primary entries: GitHub advisories GHSA-78v8-vpjp-cjqh / CVE-2026-47764 for PDM wheel installation path traversal through InstallDestination.write_to_fs(), and GHSA-ghq2-5c67-fprm / CVE-2026-47763 for project-local state and config writes following symlinks.
This batch is durable for operators because it gives a reusable Python package-manager testing pattern: attacker-controlled package or repository content crossing from the project tree into arbitrary filesystem writes by the invoking user.
Why it matters for assessments¶
PDM is often run by developers, CI jobs, release workers, and automation that trust repository-local metadata. The two advisories expose adjacent file-boundary primitives:
- a malicious wheel can include traversal entries that are joined into the install destination without the base installer's resolved-path containment check;
- a malicious repository can place project-local PDM state files as symlinks so later
pdmoperations overwrite the symlink target.
Neither proof requires leaking real secrets. Good evidence shows that a controlled canary file outside the project or install root was created or modified by a normal package-manager action.
What to map¶
- Find projects, CI workflows, devcontainer images, release scripts, or build agents that run
pdm install,pdm sync,pdm add,pdm config -l, orpdm useagainst contributor-controlled branches or dependencies. - Record the PDM version and interpreter path. The wheel traversal advisory affects PDM
<= 2.22.4; the symlink-write advisory affects PDM< 2.27.0. - Identify whether the actor can influence wheel contents, direct URL dependencies, package indexes, lockfile entries, or checked-out repository files.
- Map the privilege context: local developer shell, CI runner, release builder, container root, package-publishing job, or shared workstation.
- Pick the lowest-impact writable canary target outside the project or install root. Do not target shell startup files, SSH material, package credentials, service units, or production config.
Wheel traversal validation boundary¶
Use a lab package or an explicitly approved dependency-confusion/supply-chain test. Do not publish a malicious wheel to a public package name or replace a real dependency.
Safe proof shape:
- Build a disposable wheel containing only a traversal-path canary entry that writes a marker such as
skillz-pdm-wheel-canaryto a temporary directory outside the intended install root. - Install it with the same PDM path and options used by the target workflow, preferably in a temporary virtual environment or disposable CI job.
- Confirm whether the marker lands outside the expected installation destination.
- Capture redacted evidence: PDM version, command, wheel source under tester control, expected destination, actual canary path, and file metadata.
- Stop at canary write proof. Do not overwrite executable startup paths or sensitive files.
A strong finding demonstrates both attacker control over the wheel source and execution of a normal PDM install path in a context whose filesystem privileges matter.
Project-local symlink write validation boundary¶
Use a temporary clone or approved lab repository. The advisory notes pdm.toml as a stable sink, with related sinks including .pdm-python and .python-version.
Minimal canary flow:
# Use the same interpreter/PDM entrypoint as the tested workflow.
PDM_PY=/path/to/python-with-pdm
lab=$(mktemp -d)
target="$lab/outside-target.toml"
cat > "$target" <<'EOF'
[seed]
value = 1
EOF
mkdir "$lab/repo"
ln -s "$target" "$lab/repo/pdm.toml"
cat > "$lab/repo/pyproject.toml" <<'EOF'
[project]
name = "skillz-pdm-symlink-canary"
version = "0.0.1"
EOF
(
cd "$lab/repo" &&
"$PDM_PY" -m pdm config -l venv.in_project false
)
printf '\n--- canary target ---\n'
cat "$target"
Expected vulnerable signal: the TOML file outside the repository gains a [venv] section or other PDM-written configuration. If pdm.toml does not parse as TOML, this specific sink may fail before the write path; use a parseable canary target for this proof.
Reporting heuristics¶
- Lead with the boundary: untrusted package or repository content caused PDM to write outside the intended project/install root as the invoking user.
- Include PDM version, affected command, attacker-controlled input source, expected containment root, actual canary target, and the runner/user privilege context.
- For CI impact, show whether the job also has release tokens, package-publishing rights, repository write tokens, cache directories, or artifact-signing access; do not print token values.
- Keep proof narrow and reversible. Use temporary canary files, not real dotfiles, credentials, deployment manifests, or shell profiles.
- Avoid claiming code execution unless you separately prove that the file-write primitive reaches an executable or auto-loaded path in the assessed environment.
October 5 follow-up: Papermerge upload traversal, the file-write-to-auto-loaded-path proof this page demands¶
GHSA-5557-484j-55xw / CVE-2026-105314 (high, Papermerge 3.5.3): a standard user (not admin) achieves RCE via directory traversal in /api/documents/upload, writing a Python .pth file into site-packages, whose line is executed by every subsequent Python interpreter start in that environment. This is exactly the escalation the reporting heuristic above asks you to complete: the write primitive alone is a file-confidentiality/integrity finding; the .pth-into-site-packages sink converts it into guaranteed, persistent, interpreter-start code execution with zero further attacker action.
- Durable auto-loaded-path checklist for any Python-service upload/copy primitive with traversal:
site-packages/*.pth,site-packages/usercustomize.py,PYTHONSTARTUP-reachable files, cron/systemd paths owned by the service user, and the app's own plugin/auto-import directories..pthis the quietest: it needs no import of your file, fires on interpreter start, and survives app restarts. - Deferred-execution timing matters in reporting: the payload fires on the next interpreter start (worker respawn, restart, cron), not on upload, record the upload→fire interval and prove with an inert marker
.pth(e.g., writes a temp-file timestamp) in a disposable instance, then delete the canary and verify no marker re-fires. - Role boundary is the headline: a standard user reaching interpreter-start execution as the service account is a privilege crossing, not just storage abuse; test upload traversal with the lowest authenticated role first.
November 18 follow-up: ansible-core galaxy install, the dependency manifest is the traversal carrier (GHSA-65g3-4m89-fc5m / CVE-2026-105929, high, CWE-22)¶
ansible-galaxy role install builds the on-disk install path from an explicit role name taken from the role's own meta/requirements.yml without validating that the destination stays inside the chosen roles directory. A name containing ../ escapes it; an absolute name replaces the directory entirely. Because ansible-galaxy recursively processes transitive dependencies from an installed role's meta/requirements.yml, a malicious role publisher gets attacker-supplied files written outside the operator's roles dir on a routine ansible-galaxy install, and with --force an existing role directory outside that path is removed and replaced. Impact bounded by invoking user's filesystem permissions; requires the operator to install attacker-influenced content.
Why this belongs on this package-manager page:
- Manifest-declared name as path component, third spelling on this page (wheel entry names, project-local symlink targets, now role name): the containment bug is not in the archive extractor, it is in the metadata field that names the output directory. Audit rule for every installer/CLI: list which manifest fields (name, id, slug, key) are interpolated into output paths, and check whether containment is validated against the resolved path or only the raw template.
- Transitive trust amplification: you don't need the operator to install your role directly, a popular role's dependency tree carries your
meta/requirements.yml. Supply-chain shape for authorized testing: publish/host a lab role with a traversing dependency name and install it from a disposable control node; the canary write (or--forcereplacement of a scratch dir) outside the roles path is the entire finding. Never target real roles paths, shell startup, or SSH material. --forcesemantics are a separate destructive verb to test: normal install = write canary;--force= delete-and-replace of an out-of-root directory. On CI runners and automation hosts that pin--force(common in idempotent playbook bootstrap), the deletion leg is the higher-severity proof; use a scratch directory you created for the test.- Inventory rule: any automation host that runs
ansible-galaxy install/ansible-playbookwith galaxy dependencies against contributor-influenced requirements files (CI, devcontainers, AWX/Tower execution environments, template repos) is a candidate for this class; fingerprint the galaxy/ansible-core version first.
November 18 second follow-up: same galaxy class, the collection artifact manifest this time (GHSA-qvg5-6mh8-jpg9 / CVE-2026-130644, high)¶
The morning wave folded the ansible-galaxy role install leg (role name from meta/requirements.yml interpolated into the install path). The 06:30Z wave lands the sibling for collections: ansible-galaxy collection install derives the install destination directory from the namespace and name fields inside the collection artifact's own MANIFEST.json/galaxy.yml metadata, with no well-formed-identifier validation and no path-containment check. A crafted name escapes the configured collections path; the plugin then deletes an existing directory writable by the invoking user and writes attacker-controlled files into that location. The artifact can arrive as a local file, remote URL, source directory, git repo, or as a dependency of another collection, so the transitive-carrier amplification rule from this morning applies verbatim to the second galaxy command.
Operator-facing deltas from the role leg:
- Two install verbs, one shared defect shape, second confirmation in ~4 hours. When a class lands twice in one day on sibling commands of the same CLI, treat the whole command surface as the audit unit: for ansible-galaxy that means role install, collection install, and the
requirements.yml-driven batch path all get the manifest-field-to-output-path inventory. Same-day repeat is also a strong signal more CNA advisories are coming for this codebase; re-sweep ansible-core entries against this page before the next triage pass. - Delete-then-write is the headline verb here, no
--forceneeded: the role leg only deleted under--force; the collection leg deletes the colliding directory as normal install behavior. On automation hosts (CI runners, AWX/Execution Environments, devcontainers) the deleted-directory-plus-attacker-files sink under the invoking user is the report; prove with a scratch directory you created, never real paths. - Identifier-grammar validation is the missing control class: collection
namespace/namehave a documented grammar ([a-z0-9_]+,.-separated pair) that the installer never enforced. Generic audit rule: whenever a tool derives an output path from a manifest field that has a published grammar, test whether the installer validates against the grammar or only concatenates; grammar-check closes traversal for free, containment-on-raw-template does not.