pnpm CVE-2026-145650 lets malicious packages escape the store
Part of the CVE-2026-145650 story · since 6 Dec
- Sun 6 Dec, 03:58 UTC. cybersixt, first report. pnpm CVE-2026-145650 lets malicious packages escape the store. This article, 1st of 1.
A critical flaw in pnpm, the JavaScript package manager, lets a malicious dependency write files outside pnpm's store during an install, which can lead to code execution on the machine running it. The bug was fixed in pnpm 12.10.0 and disclosed in a pnpm security advisory on 20 November, but only received an identifier, CVE-2026-145650, on 6 December, when it was added to the GitHub Advisory Database with a CVSS score of 10.0. Anyone who has not updated pnpm v12 since 20 November is affected.
How it works
pnpm v12 is a rewrite of the install path in Rust. When the global virtual store is enabled, pnpm builds each package's directory from its name, version and a hash. The advisory says the version string from a dependency's package.json is copied into that path without any check for path traversal. A package that declares a version such as ../../../../../../tmp/PWNED therefore makes pnpm create a directory outside the store and copy the package's files into it.
That gives whoever controls a resolved dependency an arbitrary file write at install time. The advisory names the obvious targets: a repository's .git/hooks/pre-commit, an entry in node_modules/.bin, a shell profile or a scheduler drop-in, any of which runs the attacker's code later. The bug sits only on the fresh or resolving install path: pnpm install with no or a stale lockfile, pnpm add and pnpm update. The frozen-lockfile path already checks that each package stays inside the store, and that check was missing from the other path.
Who is exposed
Affected versions are pnpm 12.0.0 up to, but not including, 12.10.0, and only when enable-global-virtual-store=true. That setting is off by default, but the advisory says it is turned on by pnpm's own engine installs and by its runtime shims, and any user can enable it in configuration, so it is "reachable in ordinary supported deployments". The malicious package can arrive directly, as a transitive dependency, as a git or tarball dependency, or through a crafted lockfile in a pull request that a CI pipeline installs. That makes CI runners that install pull requests from outside contributors an obvious target.
pnpm has published other advisories since. On 28 November it disclosed a separate high-severity issue in pnpm v11, in which a resolution wrapper bypasses the npm verifier's tarball URL binding and allows code execution via a lockfile, along with a lower-severity decompression-bomb issue, according to the project's security page. Neither has a CVE yet.
What to do
- Update pnpm v12 to 12.10.0 or later. Check the version CI images and runtime shims actually use, not only developer machines.
- Until every install path is updated, use frozen-lockfile installs in CI, which already carry the containment check, and review lockfile changes in pull requests before CI installs them.
- If an unpatched pnpm v12 with the global virtual store enabled has resolved untrusted dependencies, check for unexpected files outside the store, especially in
.git/hooks,node_modules/.binand shell startup files.
How the story developed
1 article from 1 outlet since 6 Dec. Still developing; the latest report was 44 minutes ago. This was the first report.
- Sun 6 Dec, 03:58 UTC. cybersixt, first report. pnpm CVE-2026-145650 lets malicious packages escape the store. This article, 1st of 1.
- CVE not in KEV
- No CVE
- Larger: an outlet’s first report
- Coverage over time
Show all 1 articles as a listHide the list
- Sun 6 DecDay 01
- pnpm CVE-2026-145650 lets malicious packages escape the store03:58 · cybersixt · First report · This article, 1st of 1
Sources
More reporting
- Osaka Gas cyberattack halts My Osaka Gas and eight other services6 Dec
- Interac data breach: AI-assisted attack hit bank reporting tools6 Dec
- Carmel Catholic High School ransomware attack cancels classes5 Dec
- Anthropic and OpenAI statement: AI found weak spots in encryption5 Dec
- Fina data breach: Croatian agency's web vendor hack exposes OIBs5 Dec
Written by CyberSIXT from the sources above.How we reportCorrectionsRSS