Let’s talk
Back to Writing
•6 min read•
pnpmnpm supply chainCI securitySaaS security

pnpm 12's Critical Virtual Store Advisory: Check Your Version and Setting Today

A storage shelf of small packages with one box reaching outside the shelf frame, next to a padlock and a checklist

On November 20, 2026, the pnpm maintainers published GHSA-jg5c-8mvg-5wph, a critical advisory with a CVSS score of 10.0. On pnpm 12.0.0 up to (but not including) 12.10.0, a malicious dependency could write files anywhere the installing user can write, if the global virtual store is on.

The score needs context. The fix has been available since October 6, and the risky setting is off by default for project installs. Many teams will find they are fine. The ones to worry about pinned an early pnpm 12 release and turned the setting on.

Two days later, pnpm shipped 12.23.0 and 11.29.0 with a separate batch of security fixes. Those matter to far more teams, so they are covered below.

What Happened

pnpm 12 is the Rust rewrite. With the global virtual store enabled, it stores each package in a shared directory whose path includes the package's name, version and a hash.

For tarball and git dependencies, the version came straight from the dependency's own package.json and was never checked for ... A dependency with a version like ../../../../tmp/x could push its files outside the store. The advisory names git hooks, node_modules/.bin entries, shell profiles and scheduler files as targets that could turn a file write into code execution.

The bug was on the fresh install path: pnpm add, pnpm update, or pnpm install with a missing or stale lockfile. Frozen-lockfile installs already had a containment check.

The fix rejects invalid versions and checks that each directory stays inside the store. It shipped in 12.10.0.

Unconfirmed or unclear:

  • No CVE ID is listed, and the advisory was not yet in GitHub's global advisory database when checked on November 23. Scanners that read that database may not flag it.
  • The advisory does not mention exploitation, and our search found no reports of it.
  • Its text says 12.4.1 was the latest version tested and unfixed, while its version table says <12.10.0. The table matches the release notes, so use 12.10.0 as the floor.

Who Is Affected

You are exposed if both are true:

  1. A developer machine, CI job or image runs pnpm 12.0.0 to 12.9.x.
  2. It resolves dependencies with the global virtual store on: enableGlobalVirtualStore: true or virtualStoreType: global.

Two points are easy to miss:

  • Global installs. pnpm's global virtual store docs say pnpm add -g uses this store by default. The advisory does not discuss that command. Our reading is that it should be treated as in scope on affected versions.
  • Transitive dependencies. blockExoticSubdeps, on by default, stops transitive packages from using git or tarball URLs. That should narrow the route, but it is our inference, and the next section explains a gap in it.

pnpm 10 and 11 are not listed in this advisory. They have had other path traversal fixes this year, so stay on a current patch.

The November 22 Releases Are the Wider Fix

These items appear in the release notes for both 12.23.0 and 11.29.0:

  • blockExoticSubdeps now covers the lockfile. Before, pnpm accepted a pnpm-lock.yaml containing git or tarball subdependencies and installed them even with the setting on. A pull request that edits only the lockfile could get around it.
  • Token leak through otp closed. A repository could set otp: ${NPM_TOKEN} beside its own registry:, and pnpm publish would send that variable to that registry. pnpm no longer reads otp from config files.
  • Registry credentials over HTTPS only. Tarball downloads send credentials only over HTTPS or loopback HTTP.
  • Local paths rejected. A non-local package that declares file: or link: dependencies outside itself now fails with ERR_PNPM_LOCAL_SUBDEP_NOT_ALLOWED.
  • Less trust in the current folder. Global commands no longer load .pnpmfile.cjs, pnpm-workspace.yaml or .npmrc from the working directory. pnpm dlx also ignores local hooks there.

When checked on November 23, npm's latest tag still pointed to 12.21.0. The new versions were on next-12 and next-11, so a plain update will not give you these fixes yet.

What to Do Today

  1. Find every pnpm version in use. Check laptops, CI and images, not just one:
pnpm --version
grep -rn --include=package.json --exclude-dir=node_modules -E '"(packageManager|pnpm)"' .
grep -rn -A4 'pnpm/action-setup' .github/workflows
  1. Check the setting. Look in the workspace file, then ask pnpm for the effective value, which also covers global config and environment variables:
grep -nE 'enableGlobalVirtualStore|virtualStoreType' pnpm-workspace.yaml
pnpm config get enableGlobalVirtualStore
pnpm config get virtualStoreType

undefined means unset, so project installs use the default, off. true or global means on.

  1. Upgrade anything on 12.0 to 12.9. 12.10.0 is the minimum; 12.21.0 is the newer default. Run pnpm self-update in a project that pins pnpm, and commit the changed pin. With Homebrew, use brew upgrade pnpm. Update pinned versions in Dockerfiles and workflows too.
  2. Can't upgrade today? The advisory's interim advice is to keep the global virtual store off. In pnpm-workspace.yaml, set:
enableGlobalVirtualStore: false

Also remove any virtualStoreType: global, because it wins when both are set. Avoid pnpm add -g until you upgrade.

  1. Test 12.23.0 or 11.29.0 on a branch. pnpm's default minimumReleaseAge is one day, and these versions were published around 13:20 and 13:58 UTC on November 22, so an earlier update may be refused. Wait rather than turning the check off. Expect failures if a dependency relied on local paths or exotic subdependencies. 12.23.0 also removes platform variants.
  2. Review lockfile changes like code. Require review on pnpm-lock.yaml in pull requests, and use pnpm install --frozen-lockfile in CI.

How to Verify You're Safe

  • pnpm --version inside the CI job and the built image prints 12.10.0 or later, not just on your laptop.
  • If you ran an affected version with the store on, look for odd versions in the lockfile. This is a rough triage check, and it can miss cases or flag harmless lines:
grep -nE '^ +version: ' pnpm-lock.yaml | grep -F '..' | grep -vE "version: '?(link|file|workspace):"
  • List git and tarball dependencies with grep -nE 'tarball:|type: git' pnpm-lock.yaml. You should recognize each one. Private registries may also show tarball URLs.
  • On machines that were exposed, check .git/hooks, shell profiles and cron or scheduler entries for files changed around an install. If you find something you can't explain, rebuild the machine or runner and rotate the credentials it could read.

An empty result is reassuring, not proof. If an exposed runner installed untrusted pull requests, rebuild it anyway.

What to Watch Next

  • A CVE ID and an entry in GitHub's global advisory database.
  • pnpm moving latest to 12.23.0 or newer.
  • Any report of exploitation, or a clarification about global installs.
  • The global virtual store becoming a default. pnpm's docs say that is the goal, so this setting will not stay niche.

Related Reading

Next Step

If your team has one pinned pnpm version and a reviewed lockfile, steps 1 to 3 are a short job you can do yourselves. If versions differ between laptops, CI and images, or CI installs unreviewed pull requests with secrets available, that is a wider gap. The production readiness upgrade service covers dependency and CI controls. Bring your lockfile, your workflow files and a list of the secrets your install jobs can read.

Working on a SaaS that's starting to feel fragile?

Talk to an engineer about the parts that break first — without rewriting what already works. We'll recommend focused support or a compact team based on your scope.

Talk to an Engineer