pnpm
12.21.0 · 13 Nov 2026MIT358.4M / weekRepositoryHomepagenpmAtom feed
Upgrading pnpm From 10.31.0 to 10.34.9
17 releases in betweenevery note read
- 0
- changes to make
- 18
- advisories fixed
- 5
- new
- 49
- fixes
Security
Fixes 18 advisories affecting 10.31.0
- pnpm: Repository config can expand victim environment secrets into registry requests before scripts runmoderate · GHSA-3qhv-2rgh-x77r
- pnpm: Reserved bin name deletes PNPM_HOME during global removemoderate · GHSA-4gxm-v5v7-fqc4
- pnpm: Unsafe default behavior breaks integrity checkmoderate · GHSA-54hh-g5mx-jqcp
- pnpm: Manifest identity spoof satisfies allowBuilds and runs attacker lifecyclehigh · GHSA-5wx6-mg75-v57r
- pnpm: `patch-remove` could delete project-selected files outside the patches directoryhigh · GHSA-72r4-9c5j-mj57
- pnpm: Virtual store linker path traversal via unvalidated depPath name in lockfileToDepGraphhigh · GHSA-c59q-g84q-2gj5
- pnpm binds unscoped user-level npm auth credentials to a repository-selected registrymoderate · GHSA-cjhr-43r9-cfmw
- pnpm: Hoisted install imports lockfile alias outside node_moduleshigh · GHSA-fr4h-3cph-29xv
- pnpm: Repository-controlled configDependencies can select a pacquet native install enginehigh · GHSA-gj8w-mvpf-x27x
- pnpm: Tarball hash of GitHub git dependencies is not stored in lockfilemoderate · GHSA-hg3w-7f8c-63hp
- pnpm: Transitive dependency alias path traversal allows project path override via symlink replacementhigh · GHSA-hwx4-2j3j-g496
- pnpm: Git Fetch Argument Injection via Lockfile resolution.commitmoderate · GHSA-p4xf-rf54-rj3x
- pnpm Has an Integrity Check Bypass via Missing Lockfile Integrity Fieldmoderate · GHSA-q6j5-fjx5-2mc3
- pnpm: Path traversal in configDependencies env lockfile allows symlink creation outside node_modules/.pnpm-confighigh · GHSA-qrv3-253h-g69c
- pnpm Vulnerable to Arbitrary File Write/Delete via Malicious Patch File (Path Traversal)high · GHSA-rxhj-4m44-96r4
- pnpm: A tarball dependency's manifest `name` escapes node_modules → arbitrary file write/overwrite on installhigh · GHSA-vq4v-j7r6-jq4m
- pnpm: Environment secrets exfiltrated via env-placeholder expansion in proxy settings read from an untrusted pnpm-workspace.yamlhigh · GHSA-vx52-2968-3vc6
- pnpm: Project env lockfile can short-circuit package-manager resolution and execute lockfile-selected pnpm byteshigh · GHSA-w466-c33r-3gjp
- 10.34.6
Updated
adm-zipto v0.6.0, which fixes a memory-exhaustion vulnerability where a crafted ZIP file could make it allocate 4 GB of memory.adm-zipis used to extract the Node.js, Bun, and Deno archives that pnpm downloads on Windows. - 10.34.5
Fixed a path traversal vulnerability where a dependency whose manifest
namewas a scoped path traversal (e.g.@x/../../../<path>) could be written outsidenode_modulesto an attacker-controlled location duringpnpm install, even with--ignore-scripts. The isolated linker now validates the package name before using it as a directory name, matching the existing protection in the hoisted linker. - 10.34.4
Security: validate config dependency names and versions before using them to build filesystem paths. A
pnpm-workspace.yamlwith a traversal-shapedconfigDependenciesname (such as../../PWNED) or version (such as../../../PWNED) could previously causepnpm installto create symlinks or write package files outsidenode_modules/.pnpm-configand the store. Names must now be valid npm package names and versions must be exact semver versions. See GHSA-qrv3-253h-g69c. - 10.34.4
See GHSA-fr4h-3cph-29xv.
- 10.34.3
Following GHSA-3qhv-2rgh-x77r, pnpm no longer expands
${ENV_VAR}placeholders that come from a repository-controlled config file, because a malicious repository could otherwise use them to leak your environment secrets (npm tokens, CI job tokens, etc.) to an attacker-controlled registry during install. - 10.34.3
The project/workspace
.npmrc—registry,@scope:registry, proxy URLs, URL-scoped keys (//host/…), and credential values (_authToken,_auth,_password,username,tokenHelper,cert,key); - 10.34.3
Registry URLs in
pnpm-workspace.yaml.
Release by release
- Fixed
Recompute hoisted dependencies when a frozen install removes packages, so public hoist links are handed over to retained versions #16861.
- Fixed
When pnpm removes or replaces a direct dependency, it now finishes removing the dependency's bins before it deletes the dependency's directory. Packages that declare bins through
directories.binno longer leave broken shims innode_modules/.bin#16876. - Fixed
The standalone pnpm executables now embed Node.js 24.22.1. They embedded Node.js 20, which has reached end of life and still trusts the certificate authority intermediates that Node.js distrusted in October 2026.
- Fixed
- Fixed
Switching to the pnpm version in
packageManagernow works through registry mirrors that strip npm's signatures or re-sign packages with their own key. pnpm then reads the signature fromhttps://registry.npmjs.org/and verifies it against the integrity of the downloaded pnpm #16778. - Fixed
The update notification now suggests the standalone install script instead of
pnpm self-updatewhenPNPM_HOMEis not set, such as when another package manager installed pnpm.pnpm self-updateinstalls intoPNPM_HOME, so in that case it cannot replace the pnpm in use.
- Fixed
- Security
Updated
adm-zipto v0.6.0, which fixes a memory-exhaustion vulnerability where a crafted ZIP file could make it allocate 4 GB of memory.adm-zipis used to extract the Node.js, Bun, and Deno archives that pnpm downloads on Windows. - New
The update notification now suggests
pnpm self-update, or the standalone install script when pnpm is running under Corepack. It used to suggestcorepack use pnpm@<version>, orpnpm add -g pnpm/pnpm add -g @pnpm/exewhen pnpm was not installed by the standalone script — butpnpm add -grefuses to install pnpm and points atpnpm self-updateanyway, and@pnpm/exeis not published for pnpm v12 or newer, where the unscopedpnpmpackage is itself the native executable. - New
pnpm self-updateunder Corepack now points at the standalone install script too, instead of telling you to update pnpm with Corepack. - Fixed
pnpm self-updatenow resolves and verifies pnpm through registry, authentication, proxy, and TLS settings from trusted non-project configuration. Project configuration and the default project pnpmfile can no longer redirect the pnpm download or disable engine identity verification. - Fixed
Updated the embedded Node.js release keys to the current canonical
nodejs/release-keyslist. - Fixed
Updated the embedded npm registry signing keys to the set currently advertised by npm.
- Fixed
Update the embedded Node.js release keys with the new key added to nodejs/release-keys (Stewart X Addison,
655F3B5C1FB3FA8D1A0CA6BDE4A7D232B936D2FD).
- Security
- Security
Fixed a path traversal vulnerability where a dependency whose manifest
namewas a scoped path traversal (e.g.@x/../../../<path>) could be written outsidenode_modulesto an attacker-controlled location duringpnpm install, even with--ignore-scripts. The isolated linker now validates the package name before using it as a directory name, matching the existing protection in the hoisted linker. - Fixed
Prevent a crafted
pnpm-lock.yamlfrom writing package content outside the virtual store. A dependency path key whose name reconstructs to a path-traversal sequence (e.g.../../../tmp/x@1.0.0) is now rejected by the isolated (virtual-store) linker and the Plug'n'Play resolver map, matching the containment already applied to the hoisted linker. Under the global virtual store, a traversal in the version-derived path segment (e.g. a snapshotversion: "../../x") is now rejected atiterateHashedGraphNodes, the single point every global-virtual-store slot path funnels through. - Fixed
Fixed switching to and self-updating to pnpm v12. pnpm v12 (the Rust port) ships as the
pnpmand@pnpm/exenpm packages whose bins are placeholders replaced at install time by the host's native binary from a@pnpm/exe.<platform>-<arch>[-musl]optional dependency. Because pnpm installs its own engine with--ignore-scripts, that relinking never ran, leaving a non-executable placeholder. pnpm now relinks the native binary itself for v12 (recognizing the new platform-package naming scheme and the nativepnpmpackage), and verifies the native binary's npm registry signature before running it. - Fixed
${...}environment-variable placeholders in thehttpProxy,httpsProxy,noProxy,proxy, andnoproxysettings are no longer expanded when these settings come from a project'spnpm-workspace.yaml. They now receive the same protection already applied toregistry.
- Security
- Security
Security: validate config dependency names and versions before using them to build filesystem paths. A
pnpm-workspace.yamlwith a traversal-shapedconfigDependenciesname (such as../../PWNED) or version (such as../../../PWNED) could previously causepnpm installto create symlinks or write package files outsidenode_modules/.pnpm-configand the store. Names must now be valid npm package names and versions must be exact semver versions. See GHSA-qrv3-253h-g69c. - Security
See GHSA-fr4h-3cph-29xv.
- Fixed
Reject path-traversal and reserved dependency aliases (such as
../../../escape,.bin,.pnpm, ornode_modules) that come from a lockfile rather than a freshly resolved manifest. A crafted lockfile alias could otherwise be joined directly under a hoistednode_modulesdirectory, letting package files be written outside the intended install root or overwrite pnpm-owned layout. - Fixed
Prevent
pnpm patch-removefrom removing files outside the configured patches directory. - Fixed
Hardened the warning printed when a project
.npmrcuses environment variables in registry/auth settings: the suggestedpnpm config setcommand is now only included for keys made up of shell-inert characters. Because the key comes from a repository-controlled.npmrcand a shell expands$(...), backticks, and$VAReven inside double quotes, a crafted key could otherwise have turned the suggested copy-paste command into command execution.
- Security
- Security
Following GHSA-3qhv-2rgh-x77r, pnpm no longer expands
${ENV_VAR}placeholders that come from a repository-controlled config file, because a malicious repository could otherwise use them to leak your environment secrets (npm tokens, CI job tokens, etc.) to an attacker-controlled registry during install. - Security
The project/workspace
.npmrc—registry,@scope:registry, proxy URLs, URL-scoped keys (//host/…), and credential values (_authToken,_auth,_password,username,tokenHelper,cert,key); - Security
Registry URLs in
pnpm-workspace.yaml. - Fixed
Improved the warning printed when a project
.npmrcuses an environment variable in a registry/proxy URL or in registry credentials. The message now explains why the setting was ignored and how to migrate it to a trusted source — for example by runningpnpm config set "<key>" <value>to store it in the global config, or by keeping the${...}line in the user-level~/.npmrc— with a link to pnpm.io/npmrc. - Fixed
A repository-controlled project or workspace
.npmrccan no longer redirect which files pnpm loads as its trusted user and global configuration. Previously such a file could setuserconfig,globalconfig, orprefixto point at an attacker-supplied file shipped in the repository, and pnpm would load it as a trusted config source — bypassing the protection that prevents repository config from expanding environment variables into registry request destinations and credentials, and allowing it to settokenHelper. The user/global config file locations are now resolved only from trusted sources (CLI options, environment config, the npm builtin config, and defaults) before the project and workspace.npmrcfiles are read. Fixed by upgrading@pnpm/npm-confto3.0.3.
- Security
- Fixed
Package-manager bootstrap traffic is now resolved through trusted registries and trusted network config. When pnpm downloads the pnpm version requested by a repository's
packageManagerfield, the registry it fetches from (and the proxy/TLS settings used for that traffic) now come exclusively from trusted config sources — CLI options, env config, user and global.npmrc— defaulting to the public npm registry, instead of the repository's project/workspace settings. - Fixed
Pnpm now verifies the npm registry signature of a package-manager binary before spawning it. When the
packageManagerfield (orpnpm self-update) makes pnpm download another pnpm version, the staged install is verified corepack-style: the integrity recorded in the staged lockfile must carry a valid npm registry signature for the exactname@version, validated against npm's public signing keys that ship embedded in the pnpm CLI. Verification fails closed — a tampered download, an unsigned package, or an unreachable registry refuses the version switch rather than running an unverified binary. It runs only when the wanted version is actually downloaded (a tools-directory cache miss), so repeated commands pay no extra network round trip. - Fixed
Environment variable expansion is now trust-aware for registry/auth config and request destinations. Repository-controlled config files (the project and workspace
.npmrcandpnpm-workspace.yaml) can no longer expand${...}placeholders in registry/proxy request destinations, URL-scoped keys, or registry credential values, preventing repository-controlled configuration from exfiltrating environment secrets through request URLs. Trusted user/global/CLI/env config keeps full env expansion, so existing token and registry setup flows continue to work. - Fixed
Reject reserved manifest
binnames ("",".","..", and scoped forms such as@scope/..) when resolving a package's bins. These names previously passed the bin-name guard and, when joined to the global bin directory during global remove/update/add operations, could resolve to the global bin directory itself or its parent and have it recursively deleted. - Fixed
Require trusted package identity before package-name
onlyBuiltDependencies(andallowBuilds) entries can approve lifecycle scripts for git, git-hosted tarball, direct tarball, and local directory artifacts. To approve one of those artifacts explicitly, use its peer-suffix-free lockfile depPath as the key. Lockfile entries are now rejected when a registry-style dependency path (name@semver) is backed by a git, directory, or git-hosted tarball resolution (ERR_PNPM_RESOLUTION_SHAPE_MISMATCH), so the dependency path is a reliable artifact identity by the time scripts can run. - Fixed
Pnpm now verifies the detached OpenPGP signature of a Node.js release's
SHASUMS256.txtagainst the Node.js release team's public keys (embedded in the pnpm CLI) before trusting its hashes. The Node.js download mirror is repository-configurable (node-mirror:<channel>in.npmrc), and the integrity check previously trusted aSHASUMS256.txtfetched from that same mirror — a circular check that a malicious mirror could satisfy with a tampered binary and matching hashes. A mirror that proxies the real signed SHASUMS keeps working unchanged. Only thereleasechannel publishes signed SHASUMS files, so pre-release channels (rc, nightly, …) remain unverified.
- Fixed
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.