CVE-2026-59195: pnpm path traversal in configDependencies symlink creation

CVE-2026-59195 · Severity: high · CVSS 8.2 · Published 2026-07-06

pnpm is a popular JavaScript package manager used to install and manage software dependencies. A security flaw allows a malicious project to create unauthorized symbolic links (shortcuts) on a user's computer when they run the 'pnpm install' command. This could allow an attacker to overwrite or manipulate files outside of the intended project folder, potentially leading to unauthorized system changes or persistent access even if security scripts are disabled.

Technologies: pnpm (npm). Vendors: npm.

Quick answers

Is CVE-2026-59195 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-59195 being exploited in the wild.
How severe is CVE-2026-59195?
High severity, with a CVSS score of 8.2, published 6 July 2026.
Which products and versions are affected?
pnpm (npm) SEMVER:introduced=0,fixed=10.34.4.
Is there a fix for CVE-2026-59195?
Yes. pnpm (npm): upgrade to 10.34.4 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-59195 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-59195?
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.4 or later
    npm install pnpm@10.34.4

Technical details

A path traversal vulnerability exists in pnpm's handling of the 'env-lockfile' document within 'pnpm-lock.yaml'. The application fails to validate package names in the 'configDependencies' section before using them as path components in 'path.join()' operations. An attacker can commit a crafted lockfile containing traversal sequences (e.g., '../../') in a dependency name. When a user runs 'pnpm install', the tool creates a symlink from the global virtual store to a location outside the 'node_modules/.pnpm-config' directory. This exploit functions even when '--ignore-scripts' is used, providing a filesystem write primitive. The issue is resolved in versions 10.34.4 and 11.8.0 by implementing stricter name validation and path containment checks.

Affected products

  • pnpm pnpm < 10.34.4, >= 11.0.0 < 11.8.0

Identifiers

  • CVE-2026-59195
  • GHSA-qrv3-253h-g69c

Timeline

  • 2026-06-22: advisory: GitHub Security Advisory published by maintainers
  • 2026-07-06: disclosed: CVE published to NVD

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.