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

Source: https://junglewise.ai/threats/cve-2026-50016-pnpm-path-traversal-via-transitive-dependency-alias  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-25. Updated: 2026-06-26  
License: CC BY 4.0 with a link back

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

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.

Technologies: [pnpm (npm)](https://junglewise.ai/threats/technologies/pnpm). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-50016 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-50016 being exploited in the wild.

**How severe is CVE-2026-50016?** High severity, with a CVSS score of 8.8, published 25 June 2026.

**Which products and versions are affected?** pnpm (npm) SEMVER:introduced=0,fixed=10.34.0.

**Is there a fix for CVE-2026-50016?** Yes. pnpm (npm): upgrade to 10.34.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-50016 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-50016?** Check whether you run pnpm (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- pnpm (npm): upgrade to 10.34.0 or later

  ```sh
  npm install pnpm@10.34.0
  ```


## 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

## Identifiers

- CVE-2026-50016
- GHSA-hwx4-2j3j-g496

## Timeline

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

## References

- [https://api.github.com/users/aszx87410](https://api.github.com/users/aszx87410)
- [https://github.com/aszx87410](https://github.com/aszx87410)
- [https://api.github.com/users/aszx87410/gists%7B/gist_id%7D](https://api.github.com/users/aszx87410/gists%7B/gist_id%7D)
- [https://api.github.com/users/aszx87410/repos](https://api.github.com/users/aszx87410/repos)
- [https://avatars.githubusercontent.com/u/2755720?v=4](https://avatars.githubusercontent.com/u/2755720?v=4)
- [https://api.github.com/users/aszx87410/events%7B/privacy%7D](https://api.github.com/users/aszx87410/events%7B/privacy%7D)

## Related threats

- [pnpm environment secret exfiltration via proxy settings in workspace manifest](https://junglewise.ai/threats/pnpm-environment-secret-exfiltration-via-proxy-settings-in-workspace-f6626cca)
- [pnpm pacquet path traversal in lockfile dependency symlinks](https://junglewise.ai/threats/pnpm-pacquet-path-traversal-in-lockfile-dependency-symlinks-dc3f81d1)
- [pnpm tarball dependency manifest name path traversal arbitrary file write](https://junglewise.ai/threats/cve-2026-82393-pnpm-tarball-dependency-manifest-name-path-traversal-arbitrary)
- [pnpm virtual store linker path traversal via unvalidated depPath](https://junglewise.ai/threats/cve-2026-82392-pnpm-virtual-store-linker-path-traversal-via-unvalidated-deppath)
- [pnpm path traversal via crafted lockfile alias](https://junglewise.ai/threats/cve-2026-59196-pnpm-path-traversal-via-crafted-lockfile-alias)
