pnpm
12.21.0 · 13 Nov 2026MIT358.4M / weekRepositoryHomepagenpmAtom feed
Upgrading pnpm From 9.15.5 to 10.34.5
81 releases in betweennotes for 79
Counted from 79 of 81 release notes, and the breaking changes of 4 pre-releases on the way to a major. Advisories are counted from the advisory database, in full.
Before you upgrade
Tick each one off as you go- Breaking10.3.0
- Breaking10.0.0
- Breaking10.0.0
- Breaking10.0.0
- Breaking10.0.0
- Breaking10.0.0
- Breaking10.0.0
- Breaking10.0.0
- Breaking10.0.0
- Breaking10.0.0
Security
Fixes 25 advisories affecting 9.15.5
- pnpm vulnerable to Command Injection via environment variable substitutionhigh · GHSA-2phv-j68v-wwqx
- 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: Binary ZIP extraction allows arbitrary file write via path traversal (Zip Slip)moderate · GHSA-6pfh-p556-v868
- pnpm has Windows-specific tarball Path Traversalmoderate · GHSA-6x96-7vc8-cm3p
- pnpm: `patch-remove` could delete project-selected files outside the patches directoryhigh · GHSA-72r4-9c5j-mj57
- pnpm Has Lockfile Integrity Bypass that Allows Remote Dynamic Dependencieshigh · GHSA-7vhp-vf5g-r2fw
- pnpm uses the md5 path shortening function causes packet paths to coincide, which causes indirect packet overwritingmoderate · GHSA-8cc4-rfj6-fhg4
- 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 has symlink traversal in file:/git dependenciesmoderate · GHSA-m733-5w8f-5ggw
- 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 has Path Traversal via arbitrary file permission modification moderate · GHSA-v253-rj99-jwpq
- pnpm: A tarball dependency's manifest `name` escapes node_modules → arbitrary file write/overwrite on installhigh · GHSA-vq4v-j7r6-jq4m
- pnpm: Project env lockfile can short-circuit package-manager resolution and execute lockfile-selected pnpm byteshigh · GHSA-w466-c33r-3gjp
- pnpm scoped bin name Path Traversal allows arbitrary file creation outside node_modules/.binmoderate · GHSA-xpqm-wm3m-f34h
- 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. - 10.30.2
Update @zkochan/js-yaml to fix moderate vulnerability.
- 10.29.1
Update tar to version 7.5.7 to fix security issue
- 10.28.2
Security fix: prevent path traversal in
directories.binfield. - 10.28.2
This fixes a security issue where a malicious package could create symlinks to sensitive files (e.g.,
/etc/passwd,~/.ssh/id_rsa) and have their contents copied when the package is installed.
Release by release
- 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
- Fixed
Reject
pnpm-lock.yamlentries whose remote tarballresolution:block is missing theintegrityfield. Previously the worker that extracts a downloaded tarball skipped hash verification when no integrity was supplied and minted a fresh one from the unverified bytes, so an attacker who could both alter the lockfile (e.g. via a pull request that stripsintegrity:) and serve modified content at the referenced tarball URL could install a tampered package without any error — including under--frozen-lockfile. pnpm now fails closed at lockfile-read time withERR_PNPM_MISSING_TARBALL_INTEGRITY. Git-hosted tarballs (gitHosted: trueor a URL on codeload.github.com / bitbucket.org / gitlab.com) andfile:tarballs are exempt — the commit SHA in a git-host URL and the user-controlled local path already anchor the bytes.
- Fixed
- New
Treat tarball-integrity mismatches against the lockfile as a hard failure by default. Previously,
pnpm install(non-frozen) would logERR_PNPM_TARBALL_INTEGRITY, silently re-resolve from the registry, and overwrite the locked integrity — which meant a compromised registry, proxy, or republished version could substitute attacker-controlled content on a clean machine even though the project shipped a committed lockfile. - Fixed
Pin unscoped per-registry settings (
_authToken,_auth,username/_password,tokenHelper, inlinecert/key) to the registry declared in the same config source at load time, so a later layer overridingregistry=(workspace.npmrc,pnpm-workspace.yaml, CLI--registry) cannot redirect a credential or client certificate authored for a different host. A deprecation warning is emitted whenever an unscoped per-registry setting is encountered, naming the source and the URL it was pinned to. Reported by JUNYI LIU. - Fixed
Fixed
minimumReleaseAgehandling when cached metadata is abbreviated. The npm registry returns abbreviated package metadata (without the per-versiontimefield) by default, which made the maturity check throwERR_PNPM_MISSING_TIMEwhenever cached abbreviated metadata was reused. pnpm now upgrades cached abbreviated metadata to the full document via a follow-up fetch whenminimumReleaseAgeis active, persists the upgrade to the on-disk cache so subsequent installs skip the extra fetch, and letsERR_PNPM_MISSING_TIMEfrom the cache fast-path fall through to the network fetch even under strict mode. - Fixed
Reject git resolutions whose
commitfield is not a 40-character hexadecimal SHA before invokinggit. A malicious lockfile could otherwise smuggle a value such as--upload-pack=<command>throughgit fetch/git checkout, which on SSH or local-file transports executes the supplied command. - Fixed
Reject patch files whose
diff --githeaders reference paths outside the patched package directory. Previously a malicious.patchfile added via a pull request could write, delete, or rename arbitrary files reachable by the user runningpnpm install. - Fixed
Fixed
--prefix=<dir>not being honored when locating the workspace root. The--prefix → dirrename was applied after workspace detection, so workspace settings declared in<dir>/pnpm-workspace.yamlwere not loaded when pnpm was invoked from outside<dir>#11535. - Fixed
Reject dependency aliases that contain path-traversal segments (such as
@x/../../../../../.git/hooks) when reading them from a package manifest or symlinking them intonode_modules. A malicious registry package could otherwise use a transitive dependency key to makepnpm installcreate symlinks at attacker-chosen paths outside the intendednode_modulesdirectory.
- New
- Fixed
Pin the integrity of git-hosted tarballs (codeload.github.com, gitlab.com, bitbucket.org) in the lockfile so that subsequent installs detect a tampered or substituted tarball and refuse to install it. Previously the lockfile only stored the tarball URL for git dependencies, so a compromised git host or a man-in-the-middle could serve arbitrary code on later installs without lockfile changes.
- Fixed
Fix a regression where
pnpm --recursive --filter '!<pkg>' run/exec/test/addwould include the workspace root in the matched projects. The workspace root is now correctly excluded by default when only negative--filterarguments are provided, matching the documented behavior. To include the root, pass--include-workspace-root#11341.
- Fixed
- Fixed
When self-updating from v10's
@pnpm/exeto v11+ on Intel macOS (darwin-x64),pnpm self-updatenow transparently switches to the JS-onlypnpmpackage on npm instead of installing@pnpm/exe@v11+(which doesn't ship a working binary for Intel Macs because of an upstream Node.js SEA bug — see #11423 and nodejs/node#62893). Without this, the self-update would silently leave the user with no workingpnpmbinary. The new install requires Node.js to be available onPATH; a warning is printed when the swap happens. All other host/version combinations are unchanged. - Fixed
pnpm self-update(with no version argument) no longer downgrades pnpm when the registry'slatestdist-tag points to an older release than the currently active version. Runpnpm self-update latestto force a downgrade #11418.
- Fixed
12 other lines we could not sort, mostly version bumps
- 10.0.0
In a workspace: The override is added to the root of the workspace, linking the dependency to all projects in the workspace.
- 10.0.0
Global linking: To link a package globally, run
pnpm linkfrom the package’s directory. Previously, you needed to usepnpm link -g. Related PR - 10.0.0
manage-package-manager-versions: enabled by default. pnpm now manages its own version based on thepackageManagerfield inpackage.jsonby default. - 10.0.0
public-hoist-pattern: nothing is hoisted by default. Packages containingeslintorprettierin their name are no longer hoisted to the root ofnode_modules. Related Issue - 10.0.0
Upgraded
@yarnpkg/extensionsto v2.0.3. This may alter your lockfile. - 10.0.0
virtual-store-dir-max-length: the default value on Windows has been reduced to 60 characters. - 10.0.0
Reduced environment variables for scripts: During script execution, fewer
npm_package_*environment variables are set. Onlyname,version,bin,engines, andconfigremain. Related Issue - 10.0.0
All dependencies are now installed even if
NODE_ENV=production. Related Issue - 10.0.0
Store version bumped to v10.
- 10.0.0
Some registries allow identical content to be published under different package names or versions. To accommodate this, index files in the store are now stored using both the content hash and package identifier.
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.