CVE-2026-55698: pnpm arbitrary code execution via malicious lockfile metadata

CVE-2026-55698 · Severity: high · CVSS 8.8 · Published 2026-06-25

pnpm is a package manager used by developers to manage project dependencies. A vulnerability exists where a malicious project repository can include a specially crafted lockfile that tricks pnpm into downloading and executing malicious code instead of the official pnpm tool. If a developer or automated system runs pnpm within such a repository, an attacker could gain full control over the user's environment, potentially stealing secrets or compromising the software build process.

Technologies: pnpm (npm). Vendors: npm, Pnpm.

Quick answers

Is CVE-2026-55698 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-55698 being exploited in the wild.
How severe is CVE-2026-55698?
High severity, with a CVSS score of 8.8, published 25 June 2026.
Which products and versions are affected?
pnpm (npm) SEMVER:introduced=0,fixed=10.34.2; Pnpm Env-Installer < 10.34.2, >= 11.0.0, < 11.5.3.
Is there a fix for CVE-2026-55698?
Yes. pnpm (npm): upgrade to 10.34.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-55698 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-55698?
Check whether you run pnpm (npm) or Pnpm Env-Installer at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • pnpm (npm): upgrade to 10.34.2 or later
    npm install pnpm@10.34.2

Technical details

A vulnerability in pnpm's automatic version switching mechanism allows for arbitrary code execution. The `switchCliVersion()` function trusted `packageManagerDependencies` entries in the `pnpm-lock.yaml` file if the versions matched the requested pnpm version, bypassing fresh resolution from trusted registries. An attacker can commit a malicious lockfile with poisoned integrity hashes and package metadata. When a victim runs pnpm in the malicious repository, pnpm installs and executes the attacker-controlled binary. The fix involves forcing a re-resolution of package-manager metadata through trusted registries before execution, even if the lockfile appears to satisfy the version requirements.

Affected products

  • pnpm pnpm < 10.34.2, >= 11.0.0, < 11.5.3
  • pnpm @pnpm/installing.env-installer < 10.34.2, >= 11.0.0, < 11.5.3

Identifiers

  • CVE-2026-55698
  • GHSA-w466-c33r-3gjp

Timeline

  • 2026-06-15: disclosed
  • 2026-06-26: advisory

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.