ZeroHour

CVE-2026-82393

mass

Path Traversal in pnpm Tarball Dependency Handling Enables Arbitrary File Overwrite

CVSS 3.1
7.5 high
EPSS
<1%p35
Published
()
Modified
AI analysis

pnpm, a JavaScript package manager, fails to validate the name field in a tarball dependency's package.json manifest: it rejects slash characters only for unscoped names, so a crafted scoped-style name enables path traversal. During pnpm install, this unvalidated name is passed into raw path joins in the dependency resolver and graph builder, causing package files to be extracted outside node_modules. An attacker who supplies such a tarball dependency can overwrite arbitrary filesystem paths, including shell startup files, Git hooks, or installed package code, yielding code execution even when --ignore-scripts is used. Developers and CI environments running pnpm versions prior to 10.34.5 (10.x) or 11.11.0 (11.x) are affected whenever they install attacker-controlled tarball dependencies, and user interaction (an install) is required. No public proof-of-concept is known, the flaw is not in CISA KEV, and EPSS estimates only a ~0.4% chance of exploitation in the next 30 days, indicating no confirmed in-the-wild exploitation yet.

What to do: Upgrade pnpm to 10.34.5 or 11.11.0 (or later) in all developer and CI environments. As an interim measure, avoid installing dependencies from untrusted tarballs and audit lockfiles and recent installs for files written outside node_modules, modified shell startup files, or altered Git hooks. Note that --ignore-scripts does not mitigate this issue.

Affected
pnpmAll versions prior to 10.34.5 and prior to 11.11.0 (10.x and 11.x release lines before the respective fix versions)
Estimated exposure
massmillions of developer and CI installations (pnpm sees tens of millions of weekly npm registry downloads) — pnpm is one of the most widely used JavaScript package managers with tens of millions of weekly downloads across developer machines and CI pipelines, so the installed base plausibly exceeds 1 million users, though actual exploitability…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

pnpm is a package manager. Prior to 10.34.5 and 11.11.0, pnpm accepts a scoped path traversal in a tarball dependency's package.json manifest name because pnpm11/resolving/npm-resolver/src/pickPackage.ts rejects slash characters only for unscoped names. During pnpm install, the unvalidated name reaches raw path joins in pnpm11/installing/deps-resolver/src/resolvePeers.ts, pnpm11/installing/deps-resolver/src/index.ts, and pnpm11/deps/graph-builder/src/lockfileToDepGraph.ts, causing package extraction outside node_modules and allowing attacker-controlled files to overwrite arbitrary filesystem paths even when --ignore-scripts is used. The overwrite can replace shell startup files, Git hooks, or installed package code and lead to code execution. This issue is fixed in versions 10.34.5, and 11.11.0.

Weakness
CWE-22, CWE-73, CWE-94
Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H

In the news

No ingested article mentions this CVE yet.