Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. pnpm
  4. ›
  5. CVE-2026-50016

CVE-2026-50016: pnpm: Transitive dependency alias path traversal allows project path override via symlink replacement

June 26, 2026

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 pnpm@11.2.1.

References

  • github.com/advisories/GHSA-hwx4-2j3j-g496
  • github.com/pnpm/pnpm/security/advisories/GHSA-hwx4-2j3j-g496
  • nvd.nist.gov/vuln/detail/CVE-2026-50016

Code Behaviors & Features

Detect and mitigate CVE-2026-50016 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 10.34.0, all versions starting from 11.0.0 before 11.4.0

Fixed versions

  • 10.34.0
  • 11.4.0

Solution

Upgrade to versions 10.34.0, 11.4.0 or above.

Impact 8.8 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-23: Relative Path Traversal

Source file

npm/pnpm/CVE-2026-50016.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 19 Jul 2026 12:17:52 +0000.