highCVSS 8.8Vulnerability

CVE-2026-50016

## Summary pnpm allows a transitive dependency alias from registry package metadata to contain path traversal segments. During install, pnpm later uses that alias as a filesystem path when linking dependency nodes. As a result, a registry package can cause `pnpm install - ignore-scripts` to replace paths in the current project with symlinks to attacker-controlled dependency package directories. `.git/hooks` is only one useful target. The same primitive can replace other project-local paths that are consumed by later tools, for example: - `.husky` or `.githooks` for Git hook dispatchers - `scripts/`, `tools/`, `bin/`, or `tests/` for project scripts and CI commands - `.github/actions/<name>` for local GitHub Actions used later in the workflow - `dist/` or other publish/build output directories before `pnpm pack` or `pnpm publish` - `node_modules/.bin` or undeclared `node_modules/<name>` paths used by later command or module resolution Targets that are regular files can also be replaced with symlinks to a package directory, but those cases are usually denial of service. Directory targets are more useful because many developer tools execute or load files from those directories after installation. This was reproduced with `[email protected]`. ## Impact Users often run `pnpm install --ignore-scripts` expecting that untrusted package code cannot execute during installation. This issue bypasses that expectation: the malicious package does not need a lifecycle script. Instead, it silently rewires project files or directories during install, and the payload runs when the user or CI later executes another normal command. Examples include `git commit`, `pnpm test`, `pnpm run build`, a CI step that uses a local GitHub Action, or `pnpm publish` packaging a replaced `dist/` directory. In this PoC, the victim installs a normal registry package, the transitive malicious package replaces `.git/hooks`, and the payload runs when the victim later executes `git commit`. ## Root C

Properties

summary
pnpm: Transitive dependency alias path traversal allows project path override via symlink replacement
severity
high
epss_score
0.00473
cvss_score
8.8
ghsa_published
2026-06-26T22:55:51Z
source_url
https://github.com/advisories/GHSA-hwx4-2j3j-g496
ghsa_updated
2026-06-26T22:55:52Z
ghsa_id
GHSA-hwx4-2j3j-g496
cve_id
CVE-2026-50016
cvss_vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
is_ghsa_only
false
epss_percentile
0.38439

Related Entities (5)

ENRICHED_BY (1)

[Source]FIRST EPSS

HAS_WEAKNESS (1)

[Weakness]Relative Path Traversal

REPORTED_BY (1)

[Source]GitHub Advisory Database

VULNERABLE_TO (1)

[Software]npm/pnpm

AFFECTS (1)

[Software]npm/pnpm

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-50016 (CVSS 8.8) — Ninja Signal Threat Intelligence | Ninja Signal