Junglewise Threat Intelligence

CVE-2026-50016: pnpm path traversal via transitive dependency alias

CVE-2026-50016 · Severity: high · CVSS 8.8 · Published 2026-06-25

Executive brief

pnpm is a package manager used by developers to install and manage software dependencies. A vulnerability allows a malicious package to silently replace important project files or directories with links to attacker-controlled code during the installation process. This can lead to the execution of malicious commands when the developer later performs routine tasks like committing code to Git or running tests, even if they used security flags to prevent script execution during install.

Technical details

A path traversal vulnerability exists in pnpm's handling of dependency aliases within package metadata. When pnpm processes a transitive dependency that uses an 'npm:' alias containing traversal segments (e.g., '../../'), it fails to validate or normalize the path before passing it to symlink creation logic. An attacker can craft a malicious package that, when installed as a transitive dependency, escapes the 'node_modules' directory to overwrite project-local paths like '.git/hooks' or 'scripts/' with symlinks to attacker-controlled directories. This bypasses the '--ignore-scripts' security measure, as the malicious payload is executed during subsequent developer or CI/CD actions rather than during the installation itself. Patches are available in versions 10.34.0 and 11.4.0.

Affected products

  • pnpm pnpm < 10.34.0, >= 11.0.0, < 11.4.0

Timeline

  • 2026-05-28: advisory: Initial GitHub Advisory published.
  • 2026-06-26: patched: Advisory updated with patched versions.

References