# pnpm pacquet path traversal in lockfile dependency symlinks

Source: https://junglewise.ai/threats/pnpm-pacquet-path-traversal-in-lockfile-dependency-symlinks-dc3f81d1  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-01. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

Severity: low · CVSS 3.1 · Published 2026-09-01

pnpm is a popular Node.js package manager that uses lockfiles to manage project dependencies. A vulnerability in pnpm's pacquet component allows a malicious lockfile to create symbolic links that escape the project directory, potentially allowing an attacker to write files to arbitrary locations on the system when the lockfile is installed with trust enabled. This could lead to arbitrary code execution or system compromise.

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

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** Low severity, with a CVSS score of 3.1, published 1 September 2026.

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

**Is there a fix for This vulnerability?** Yes. pnpm (npm): upgrade to 12.0.0-alpha.5 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is This vulnerability attacked?** It is attacked over the network, in a software library.

**Am I affected?** 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 12.0.0-alpha.5 or later

  ```sh
  npm install pnpm@12.0.0-alpha.5
  ```


## Technical details

The vulnerability is a path traversal (CWE-22) and improper link resolution (CWE-59) issue in pacquet's install logic. When processing a crafted lockfile with dependency aliases containing traversal segments (e.g., `../../escaped-link`), the package manager could create symbolic links outside the project boundary without proper validation. The vulnerability affects both direct dependency links and global virtual-store slots, and can be exploited even when --trust-lockfile or frozen lockfiles are used. The fix adds a shared safe_join_modules_dir helper that validates all dependency names, virtual-store paths, and link destinations before filesystem materialization, rejecting absolute paths, reserved names, and traversal sequences. The patch was released in pnpm 12.0.0-alpha.5 and applied across install, symlink, bin, hoist, and virtual-store code paths.

## Affected products

- pnpm pnpm >=12.0.0-alpha.0, <12.0.0-alpha.5

## Timeline

- 2026-09-01: disclosed: GHSA-2rx9-3g3h-c2jv published
- 2026-09-01: patched: Fix released in pnpm 12.0.0-alpha.5

## References

- [https://github.com/pnpm/pnpm/security/advisories/GHSA-2rx9-3g3h-c2jv](https://github.com/pnpm/pnpm/security/advisories/GHSA-2rx9-3g3h-c2jv)
- [https://github.com/pnpm/pnpm/pull/12872](https://github.com/pnpm/pnpm/pull/12872)
- [https://github.com/pnpm/pnpm/commit/51300fd41c5e4c8f47635108e373cc3d1f324fa7](https://github.com/pnpm/pnpm/commit/51300fd41c5e4c8f47635108e373cc3d1f324fa7)
- [https://github.com/pnpm/pnpm](https://github.com/pnpm/pnpm)

## 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 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)
- [pnpm path traversal in configDependencies symlink creation](https://junglewise.ai/threats/cve-2026-59195-pnpm-path-traversal-in-configdependencies-symlink-creation)
