A critical CVSS 10.0 pnpm path traversal vulnerability (CVE-2026-145650) hits pnpm v12 when the pnpm global virtual store is on. A crafted package manifest lets foes write files outside the store during installs, which can lead to code execution. Maintainers fixed the bug in pnpm 12.10.0.
- CVE: CVE-2026-145650
- CVSS: 10.0 (Critical · CVSSv4)
- Product: pnpm
- Affected: 12.0.0
- Impact: pnpm from 12.0.0 before 12.10.0 Path Traversal via Global Virtual Store Version
- Status: No confirmed exploitation yet
- Patched in: 12.10.0
- Action: Update to 12.10.0 now
Technical Analysis
Attack Vector and Prerequisites
This bug (GHSA-jg5c-8mvg-5wph, found by Zhixi “Jace” Sun) hits dev boxes and CI runners. To abuse it, two things must be true. First, the project must set enable-global-virtual-store=true. Second, the user or CI job must run a fresh install, like pnpm add or pnpm install with no frozen lockfile. That run must pull a bad tarball or Git package.
Root Cause in the Rust v12 Install Path
The pnpm path traversal vulnerability stems from CWE-22 and CWE-73 in the Rust v12 engine. When pnpm builds a store slot path, it copies the package.json version string straight into the path. However, it never cleans or blocks .. path parts.
While the frozen-lockfile path runs a store check before writing files, the fresh-install path skips it. As a result, pnpm makes the escaped folder on disk and writes the package files outside the store. The official pnpm GitHub advisory shows a proof of concept that writes files into a temp folder.
Affected Products, Impact, and Exploitation Status
- Affected Package: pnpm (npm ecosystem), versions 12.0.0 through versions prior to 12.10.0.
- Exposure Condition: Only installs with
enable-global-virtual-store=trueare exposed (off by default, though enabled by some shims and user configs).
Because a foe controls the target path and file data, they can overwrite key files. Writing to .git/hooks/pre-commit, node_modules/.bin, or a shell profile can run code on the build host. At press time, Brandefense, Rapid7, and VulDB confirm no live attacks in the wild. Even with a public proof of concept in the notice, no live raids are confirmed.
Remediation and Mitigation
Dev and DevOps teams should update all local boxes and CI runners to pnpm 12.10.0 or newer now. Build 12.10.0 checks store bounds and blocks bad version strings during installs.
If you cannot patch today, keep enable-global-virtual-store turned off, mainly when adding outside packages. Finally, check your CI jobs and recent installs to make sure no rogue files landed outside the pnpm global virtual store from this pnpm path traversal vulnerability.
Support Our Threat Intelligence
Find our vulnerability reports and weekly recaps helpful? Support our work today and unlock a 100% ad-free reading experience!