HIGH 8.8

CVE-2026-55698: pnpm Package Manager Supply-Chain Attack via Lockfile Injection

pnpm, a popular Node.js package manager, contains a vulnerability in versions before 10.34.2 and 11.5.3 that allows malicious repositories to inject and execute arbitrary code during package manager installation. The issue stems from pnpm's trust in cached package-manager metadata within the pnpm-lock.yaml file. When a repository commits a specially crafted lockfile with matching pnpm and @pnpm/exe versions, pnpm may skip fresh resolution of the package manager itself and instead execute code from the attacker-controlled lockfile during automatic version switching. An attacker would need to trick a developer into cloning and running commands in a malicious repository, but no special credentials or authenticated access is required.

Source data · NVD / CISA · public domain

CVSS
3.1 · 8.8 HIGH · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weaknesses (CWE)
CWE-345, CWE-494, CWE-829
Affected products
1 configuration(s)
Published / Modified
2026-06-25 / 2026-06-30

NVD description (verbatim)

pnpm is a package manager. Prior to 10.34.2 and 11.5.3, pnpm can persist package-manager bootstrap metadata in the first YAML document of pnpm-lock.yaml. Before the patch, direct pnpm execution trusted an already resolved packageManagerDependencies entry when the committed env lockfile contained matching pnpm and @pnpm/exe versions. A malicious repository could therefore commit package-manager lockfile package records and snapshots that bypassed fresh package-manager resolution, then cause pnpm to install and execute bytes selected by that committed lockfile state during automatic version switching. This vulnerability is fixed in 10.34.2 and 11.5.3.

2 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability exists in how pnpm handles bootstrap metadata persisted in the first YAML document of pnpm-lock.yaml. When pnpm performs automatic version switching, it references the packageManagerDependencies entry from the committed lockfile. Prior to the fix, if this entry contained versions matching the resolved pnpm and @pnpm/exe already present, pnpm would trust those cached package records and snapshots without re-validating or freshly resolving them from upstream sources. This bypasses the normal package integrity checks and allows an attacker who controls the repository to specify arbitrary package snapshots that pnpm will install and execute. The flaw affects both the 10.x and 11.x release lines, with fixes available in 10.34.2 and 11.5.3.

Business impact

Development teams using pnpm are at risk of supply-chain compromise if they clone repositories controlled or influenced by attackers. Since pnpm is commonly used in continuous integration, local development, and automated build pipelines, a successful attack could result in arbitrary code execution with the privileges of the developer or CI/CD system. This could lead to theft of secrets, modification of source code, injection of malicious dependencies into built artifacts, or lateral movement within development infrastructure. Organizations should prioritize patching across all development machines and CI/CD environments where pnpm is used.

Affected systems

The vulnerability affects pnpm versions prior to 10.34.2 (affecting all 10.x versions up to 10.34.1) and prior to 11.5.3 (affecting all 11.x versions up to 11.5.2). Any development environment, CI/CD pipeline, or automated build system running these versions is potentially at risk if it clones and executes pnpm commands on untrusted or compromised repositories. Organizations should inventory all installations of pnpm, including those managed via Node Version Managers (nvm, fnm, volta) or installed globally via npm, and verify they are running patched versions.

Exploitability

Exploitation requires user interaction: a developer must clone a malicious repository and execute pnpm commands (such as pnpm install or pnpm run). The attack does not require authentication, elevated privileges, or network-based exploitation—it operates at the package-manager level during normal workflow. The attack surface is particularly broad because developers routinely work with multiple open-source and third-party repositories. While the CVSS score of 8.8 reflects the severity, real-world exploitation likelihood depends on how often developers interact with untrusted code repositories, though this is common in development environments.

Remediation

Organizations should immediately update pnpm to version 10.34.2 or later for the 10.x line, or version 11.5.3 or later for the 11.x line. The patched versions include proper re-validation and fresh resolution of package-manager dependencies, preventing the bypass of integrity checks. After patching, clear any cached pnpm metadata by deleting .pnpm-store or equivalent cache directories if necessary, and verify that CI/CD pipelines and development machines are running the updated version before resuming work with potentially sensitive repositories.

Patch guidance

Patching should be prioritized across all three layers: (1) Local development machines—update pnpm globally or per-project via package.json/pnpm-workspace.yaml; (2) CI/CD systems—update pnpm in Docker images, GitHub Actions workflows, and build agent configurations; (3) Version managers—if using nvm, fnm, or volta, ensure those tools can access and install the patched versions. Verify the patch is applied by running `pnpm --version` and confirming it returns 10.34.2+ or 11.5.3+. Test patches in a non-production CI/CD environment first to ensure compatibility with existing workflows and lockfile formats.

Detection guidance

Monitor for indicators of compromise: (1) Review pnpm-lock.yaml files in version control for suspicious or unexpected packageManagerDependencies entries, particularly those referencing unknown or unusual snapshot checksums; (2) Audit execution logs in CI/CD systems for unexpected pnpm version switches or installations of unexpected binaries; (3) Check for unauthorized changes to .pnpm-store or node_modules directories, especially binaries; (4) Correlate the timing of repository clones and pnpm executions with any observed data exfiltration, credential access, or code modifications. Organizations without detailed audit logs should implement enhanced logging of pnpm operations in development and CI/CD environments.

Why prioritize this

This vulnerability should be patched urgently due to its high severity (CVSS 8.8), wide distribution of pnpm in development ecosystems, and the risk of supply-chain compromise. Unlike many vulnerabilities that require special conditions or advanced exploitation, this one can be triggered by a developer's normal workflow of cloning a repository and running standard package-manager commands. The impact—arbitrary code execution in development and CI/CD environments—creates a direct path to compromise of source code, secrets, and build artifacts. While not yet on CISA's KEV list, the vulnerability's ease of exploitation and potential for widespread impact warrant treatment as a critical priority.

Risk score, explained

The CVSS 3.1 score of 8.8 (HIGH severity) reflects: Attack Vector = Network (the malicious lockfile is distributed via repository clone), Attack Complexity = Low (no special conditions required), Privileges Required = None (attacker need not authenticate), User Interaction = Required (a developer must execute pnpm), Scope = Unchanged (impact is limited to the user's environment), and the Confidentiality, Integrity, and Availability impacts are all High (arbitrary code execution with full system access). The score appropriately captures the risk of supply-chain compromise through a commonly-used development tool, though real-world impact varies based on how widely pnpm is deployed within an organization and how frequently developers interact with untrusted repositories.

Frequently asked questions

Can this vulnerability be exploited without cloning a repository?

No. The attack requires a developer or CI/CD system to clone and execute pnpm commands in a repository containing the malicious pnpm-lock.yaml file. Remote, network-only exploitation is not possible; the attacker must inject the crafted lockfile into a repository that the target will access.

Does this affect pnpm used as a transitive dependency in other projects?

No, this vulnerability specifically targets pnpm as the package manager itself, not projects that depend on pnpm as a library. However, if a project specifies pnpm as a workspace manager or uses pnpm in its build toolchain, those projects are affected.

Are there any workarounds if we cannot patch immediately?

Workarounds are limited and not recommended as a long-term solution. In the short term, you could audit pnpm-lock.yaml files for suspicious packageManagerDependencies entries or restrict developers from cloning untrusted repositories. However, these are stopgaps; immediate patching to 10.34.2 or 11.5.3 is the only reliable remediation.

Will patching break our existing pnpm-lock.yaml files?

No. The patch updates how pnpm validates the lockfile but does not change the lockfile format itself. Existing legitimate lockfiles will continue to work. However, after patching, pnpm will re-validate and may regenerate entries in the packageManagerDependencies section to ensure they are properly resolved from trusted sources.

This analysis is provided for informational purposes and is based on publicly available vulnerability data. Organizations should verify all patches, versions, and guidance against official pnpm vendor advisories and their own internal security policies before implementation. SEC.co does not warrant the completeness or accuracy of this intelligence and recommends consulting with your security team and the affected vendor for definitive guidance on this vulnerability. Source: NVD (public-domain), retrieved 2026-08-03. Analysis generated by SEC.co (claude-haiku-4-5).