On November 22, 2026, two stable releases of the package manager shipped at once: pnpm 12.23.0 and pnpm 11.29.0. Both branches received a shared wave of patches against supply-chain attacks, where an attacker tampers with a dependency or repository config to steal tokens or run arbitrary code during installation. Updating both branches together was deliberate: projects on 11.x need the security fixes and Docker repairs right away without breaking lockfiles over removed 12.x features.
The NPM_TOKEN leak and supply-chain hardening
The biggest pitfall patched in both releases involves OTP, the one-time two-factor authentication code used when publishing packages. Previously, pnpm happily read the otp field from configuration files. Imagine cloning someone else's repository where pnpm-workspace.yaml hides otp: ${NPM_TOKEN} right next to a spoofed registry:. When you ran pnpm publish, the package manager substituted your environment secret and sent it to the attacker's server in the npm-otp header of the very first request. The trap triggered instantly.
In 12.23.0 and 11.29.0, that vector is shut down. pnpm now ignores otp in pnpm-workspace.yaml and the global config.yaml with a warning, and pnpm config set otp fails with ERR_PNPM_CONFIG_SET_NOT_A_FILE_SETTING. You can only pass the code via a CLI flag or an environment variable.
# Safe way to pass OTP when publishing locally
pnpm publish --otp=123456
# Passing via environment variable in a CI runner
PNPM_CONFIG_OTP=123456 pnpm publish
# One-off release age filter (in minutes)
pnpm add express --minimum-release-age=1440
The third command shows the new --minimum-release-age and --minimum-release-age-exclude flags, now available in install, add, update, and dlx across both branches. They let you filter out brand-new (and potentially compromised) versions for a single run without editing your config. In 12.23.0, this is paired with a referenceTime setting (RFC 3339 timestamp in config or PNPM_CONFIG_REFERENCE_TIME) to keep release-age checks reproducible.
Several other attack vectors were closed at the same time. If a registry package pulls in a local subdependency via file:, link:, or a path-based workspace:, pnpm install now fails with ERR_PNPM_LOCAL_SUBDEP_NOT_ALLOWED (relative file: links inside a package's own tarball and explicit rules in overrides, packageExtensions, or .pnpmfile.cjs still work). The blockExoticSubdeps: true setting is now enforced against pnpm-lock.yaml entries too, including under --frozen-lockfile. Registry credentials are sent strictly over HTTPS or loopback HTTP with path checks on redirects. Commands like dlx, pnx, create, and global -g installs no longer pick up local .pnpmfile.cjs, .npmrc, or pnpm-workspace.yaml files from the working directory. Finally, pnpm config get refuses to print protected tokens, pnpm config list hides TLS keys and proxy passwords, picomatch received a ReDoS fix for patterns like +(*)z, and unresolved environment variables in configs without fallbacks now fail cleanly with ERR_PNPM_CONFIG_UNRESOLVED_ENV_VAR.
Everyday workflow commands in pnpm 12.23.0
While 11.29.0 focuses on security and stability, 12.23.0 adds tools that cut down routine work in monorepos.
Official pnpm package manager banner (Source: pnpm.io)
First comes pnpm catalog migrate. pnpm supports catalogs (catalog:): you define shared package versions once in pnpm-workspace.yaml and write "react": "catalog:" in each package.json. The new command scans your workspace for dependencies sharing the same specifier, moves them into the default catalog, replaces them with catalog:, and lists any mismatched versions untouched.
Second, pnpm link gains a --hard flag. Regular symlinks often break builds during local library debugging because the package resolves peerDependencies relative to its own source folder instead of your app. A hard link points to the same data on disk while keeping the files inside your app's node_modules, so all dependencies resolve from there. The link is recorded via file:, and pnpm unlink removes it.
Third, the release adds pnpm edit (opens an installed package folder in your editor), ! exclusion globs in pnpm remove, and a smarter pnpm update --latest <pkg> (plus --interactive --latest) that updates matching override entries while keeping your range format intact (^ stays ^, exact versions stay exact). pnpm update also gains a --tag <tag> flag.
# Move shared monorepo dependencies into a catalog
pnpm catalog migrate
# Link a local package using hard links
pnpm link --hard ../my-local-pkg
# Remove all eslint-* packages except eslint-plugin-import
pnpm remove "eslint-*" "!eslint-plugin-import"
# Update a package to latest along with its overrides entry
pnpm update --latest lodash
This toolkit removes common friction in workspaces: migrating to catalogs takes one command, local library debugging stops tripping over duplicate peerDependencies, and updating pinned overrides no longer requires manual config edits.
Removal of platform variants and Docker fixes without TTY
The main breaking change in pnpm 12.23.0 is the removal of experimental platform variants (publishing multiple OS/CPU tarballs under a single package version). Each version now has strictly one tarball again: publishConfig.variants and variant are ignored, and pnpm pack --variant plus --upload-variant, --variant-integrity, and --no-variants on pnpm publish are gone.
If a lockfile contains variants for a registry package, pnpm install --frozen-lockfile on 12.23.0 will fail with ERR_PNPM_BROKEN_LOCKFILE. Running a regular pnpm install rebuilds pnpm-lock.yaml and fixes it. Authors of packages with native binaries should switch to the ecosystem standard (used by esbuild, rollup, and swc): publish each platform build as a separate package under optionalDependencies and declare target OS/CPU pairs in pnpm.supportedArchitectures. The catalog: protocol works inside optionalDependencies as well.
{
"name": "my-cli",
"optionalDependencies": {
"@my-scope/my-cli-linux-x64": "1.2.0",
"@my-scope/my-cli-darwin-arm64": "1.2.0"
},
"pnpm": {
"supportedArchitectures": {
"os": ["linux", "darwin"],
"cpu": ["x64", "arm64"]
}
}
}
After updating this configuration and running pnpm install, the lockfile rebuilds into a standard format understood equally by pnpm, npm, and Bun.
A second major CI fix landed in 11.29.0. Previously, when node_modules became incompatible, pnpm install prompted for confirmation before recreating it and crashed in Docker or CI environments without a TTY. Now 11.29.0 recreates the directory automatically and logs a warning explaining why; setting confirmModulesPurge: false explicitly is only needed for custom or symlinked module directories. 12.23.0 also added a clear warning explaining the reason.
Cleaner output, an upgraded pnpm doctor, and which branch to pick
12.23.0 cleans up terminal logs too. Warnings about deprecated packages moved to the install summary and only list details for packages added by the current command, collapsing older ones into a single line (3 deprecated packages are still installed). Unused overrides also trigger a single-line warning (2 overrides matched no dependency: foo, parent>child, which you can disable with warnUnusedOverrides: false).
pnpm doctor got smarter as well: it checks all node binaries in PATH, reports the shell used for lifecycle scripts, runs a test script (printing a shim trace on failure outside Windows), and detects conflicting pnpm installs from npm, Homebrew, Corepack, Volta, or Scoop along with the command to remove them. As extra bonuses in 12.23.0, the binary is roughly 16% smaller on Linux and macOS, no-op --frozen-lockfile runs on Homebrew Node.js are up to 3x faster, and publishing a non-private package with a private workspace dependency is now blocked.
| Change | 11.29.0 | 12.23.0 |
|---|---|---|
Block otp in configs, ban file:/link: subdeps, HTTPS-only | Yes | Yes |
--minimum-release-age, dlx/-g isolation, blockExoticSubdeps in lockfile | Yes | Yes |
Auto-recreate incompatible node_modules without TTY in Docker/CI | Yes | Warning added |
pnpm catalog migrate, pnpm edit, pnpm link --hard, globs in pnpm remove | No | Yes |
Auto-update overrides, compact deprecated logs, new pnpm doctor | No | Yes |
Remove platform variants (requires lockfile rebuild if used) | No | Yes |
The choice is simple. If you are on 11.x and want to patch the token leak and Docker TTY crashes safely, install 11.29.0 (just check for otp and unset env vars in your configs). If you are already on 12.x or want catalogs, pnpm link --hard, and cleaner logs, upgrade to 12.23.0, rebuilding your lockfile first if your project used variants.


