CVE-2026-82393: pnpm tarball dependency manifest name path traversal arbitrary file write

CVE-2026-82393 · Severity: high · CVSS 7.5 · Published 2026-08-31

pnpm is a package manager used by developers to install and manage JavaScript dependencies. A flaw in pnpm's package resolution allows an attacker to craft a malicious tarball with a specially crafted package name that can write or overwrite arbitrary files outside the project directory (e.g., shell configuration files, Git hooks, or other packages' code) when a developer runs `pnpm install`, even with safety flags enabled. This could lead to code execution and compromise of the developer's machine or build pipeline.

Technologies: pnpm (npm). Vendors: npm.

Quick answers

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

Technical details

The vulnerability is a path traversal / directory escape (CWE-22) in pnpm's dependency resolution logic. The isolated-linker import target is constructed using `path.join(modules, <resolved name>)` in three locations (`resolvePeers.ts:706`, `index.ts:614`, `lockfileToDepGraph.ts:233`) without the `safeJoinModulesDir` guard that protects other path-construction sites. A malicious tarball's `package.json` can declare a scoped name containing path traversal sequences (e.g., `@x/../../…/<abs path>`), bypassing the validate-name check that only rejects unscoped names with `/`. When pnpm installs this dependency, the traversal escapes the `node_modules/.pnpm/<id>/node_modules/` directory boundary and reaches an attacker-specified absolute path, enabling overwrite of arbitrary files. The attack succeeds during `pnpm install --ignore-scripts`, defeating that mitigation. An attacker controls destination, filenames, and file contents, enabling code execution via shell initialization files, Git hooks, or other packages' code. Patches apply `safeJoinModulesDir` to the affected join calls and enforce `validate-npm-package-name` on resolved manifest names to reject traversal attempts before any write.

Affected products

  • pnpm pnpm < 10.34.5, >= 11.0.0 < 11.11.0

Identifiers

  • CVE-2026-82393
  • GHSA-vq4v-j7r6-jq4m

Timeline

  • 2026-08-02: disclosed: GitHub Security Advisory published
  • 2026-07-09: patched: Patch commits 51300fd and 78e29fe merged
  • 2026-09-02: advisory: GHSA-vq4v-j7r6-jq4m formally published

References

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