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

Source: https://junglewise.ai/threats/cve-2026-55698-pnpm-arbitrary-code-execution-via-malicious-lockfile-metadata  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-25. Updated: 2026-06-27  
License: CC BY 4.0 with a link back

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)](https://junglewise.ai/threats/technologies/pnpm). Vendors: [npm](https://junglewise.ai/threats/vendors/npm), [Pnpm](https://junglewise.ai/threats/vendors/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

  ```sh
  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

- [https://github.com/pnpm/pnpm/security/advisories/GHSA-w466-c33r-3gjp](https://github.com/pnpm/pnpm/security/advisories/GHSA-w466-c33r-3gjp)
- [https://api.github.com/repos/pnpm/pnpm/security-advisories/GHSA-w466-c33r-3gjp](https://api.github.com/repos/pnpm/pnpm/security-advisories/GHSA-w466-c33r-3gjp)

## Related threats

- [pnpm environment secret exfiltration via proxy settings in workspace manifest](https://junglewise.ai/threats/pnpm-environment-secret-exfiltration-via-proxy-settings-in-workspace-f6626cca)
- [pnpm pacquet path traversal in lockfile dependency symlinks](https://junglewise.ai/threats/pnpm-pacquet-path-traversal-in-lockfile-dependency-symlinks-dc3f81d1)
- [pnpm tarball dependency manifest name path traversal arbitrary file write](https://junglewise.ai/threats/cve-2026-82393-pnpm-tarball-dependency-manifest-name-path-traversal-arbitrary)
- [pnpm virtual store linker path traversal via unvalidated depPath](https://junglewise.ai/threats/cve-2026-82392-pnpm-virtual-store-linker-path-traversal-via-unvalidated-deppath)
- [pnpm path traversal via crafted lockfile alias](https://junglewise.ai/threats/cve-2026-59196-pnpm-path-traversal-via-crafted-lockfile-alias)
