MEDIUM 6.5

CVE-2026-55699: pnpm Path Traversal in Global Package Removal

pnpm, a widely-used Node.js package manager, contains a path-traversal vulnerability in how it handles global package installation and removal. Specifically, malicious package manifests can specify bin names (executable entry points) that bypass pnpm's validation checks—using names like ".", "..", or empty strings. When a user installs such a package globally and later removes, updates, or adds a replacement, pnpm incorrectly derives these malicious bin names and attempts to delete files at unintended locations. A bin name of "." would target the entire global bin directory; ".." would target its parent directory. An attacker distributing a malicious package could potentially delete or corrupt critical files in the global bin environment on a user's system.

Source data · NVD / CISA · public domain

CVSS
3.1 · 6.5 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Weaknesses (CWE)
CWE-22, CWE-73
Affected products
1 configuration(s)
Published / Modified
2026-06-25 / 2026-06-29

NVD description (verbatim)

pnpm is a package manager. Prior to 10.34.2 and 11.5.3, Manifest bin object keys such as "", ".", and ".." passed pnpm's bin-name guard. When a malicious package was installed globally, later global remove, update, or add-replacement flows could re-derive those names from the installed manifest and pass path.join(globalBinDir, binName) to removeBin. For "." this targets the global bin directory; for ".." this targets its parent. 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 resides in pnpm's bin-name validation logic prior to versions 10.34.2 and 11.5.3. The flaw allows manifest-defined bin object keys that should be rejected—empty strings, ".", and ".."—to pass the guard validation. During global package operations (install, remove, update, add-replacement), pnpm reconstructs bin names from the installed manifest and supplies them to the removeBin function via path.join(globalBinDir, binName). The path.join semantics mean that "." resolves to the target directory itself, and ".." resolves one level up the directory hierarchy, resulting in directory deletion rather than selective bin file removal. This is a path-traversal issue exacerbated by insufficient input sanitization on manifest-supplied names.

Business impact

Organizations relying on pnpm for global tool installation face availability and integrity risks. A compromised or malicious package can corrupt or delete the global bin directory or its parent, rendering globally installed tools inoperable and potentially interfering with system administration tasks. In development pipelines that auto-update dependencies, this could trigger unexpected service disruptions. The attack requires social engineering (tricking a user to install a malicious package), but once installed, subsequent routine package management operations trigger the damage automatically.

Affected systems

pnpm versions prior to 10.34.2 (in the 10.x branch) and prior to 11.5.3 (in the 11.x branch) are affected. Any system where pnpm is used to globally install packages is at risk, particularly development workstations, CI/CD environments, and container images that rely on global pnpm-installed tools. The vulnerability does not affect local (project-level) package installations.

Exploitability

Exploitability is moderate. An attacker must convince a user to install a malicious package globally—a social engineering step. However, once installed, the vulnerability is triggered automatically by routine pnpm operations (remove, update, add-replacement) that do not require additional user interaction. No advanced technical knowledge is needed to craft a malicious manifest. The network-based attack vector and low privilege requirements (any user can install global packages) lower the barrier to exploitation, though the user interaction requirement prevents worm-like propagation.

Remediation

Upgrade pnpm to version 10.34.2 or later (for 10.x users) or to version 11.5.3 or later (for 11.x users). No workarounds are available for earlier versions. Organizations should inventory global pnpm installations across development and CI/CD infrastructure and prioritize patching in environments where third-party or untrusted packages are installed globally.

Patch guidance

For pnpm 10.x users: upgrade to 10.34.2 or a later 10.x version. For pnpm 11.x users: upgrade to 11.5.3 or a later 11.x version. Check the official pnpm repository and release notes for guidance on your specific deployment method (npm, homebrew, direct download, etc.). Test patched versions in a non-production environment before wide rollout, particularly in CI/CD pipelines where pnpm is critical to build processes.

Detection guidance

Identify pnpm installations across your environment using asset management tools or package managers. Verify the installed version (run `pnpm -v`). Audit global package installations (`pnpm list -g`) to identify packages installed from untrusted or external sources. Examine recent pnpm operations (install, remove, update) in logs for correlation with unexpected file deletions or permission errors in the global bin directory or its parent. Monitor the global bin directory for unexpected modifications or removal of critical tool binaries.

Why prioritize this

Although rated MEDIUM severity (CVSS 6.5), this vulnerability merits priority attention because it affects a fundamental development tool used across numerous organizations. The combination of automatic trigger after initial compromise, potential for widespread damage to the bin environment, and the ubiquity of pnpm in JavaScript/Node.js development pipelines creates cascading risk. Organizations with high-velocity development or CI/CD automation should patch urgently to avoid disruption.

Risk score, explained

The CVSS 3.1 score of 6.5 (MEDIUM) reflects a network-based attack vector, low attack complexity, no privilege requirement, user interaction needed (installation of a malicious package), and high availability impact (directory deletion). The score appropriately captures the integrity and availability damage potential but emphasizes the user interaction barrier. In contexts where developers routinely install experimental or third-party global packages, the practical risk may be elevated.

Frequently asked questions

Can this vulnerability be exploited without installing a malicious package first?

No. An attacker must first convince a user to install a malicious package globally. Once installed, the vulnerability is triggered by normal pnpm operations, but the initial installation step is a necessary prerequisite.

Does this affect packages installed locally in a project?

No. The vulnerability is specific to global package installations managed by pnpm's global bin directory. Local project dependencies are not affected.

What files or directories are at risk if I install a malicious package?

A malicious manifest using "." as a bin name could target the entire global bin directory. Using ".." could target the global bin directory's parent, potentially affecting other system directories at that level. The exact scope depends on the pnpm global directory configuration and the OS.

Should I remove globally installed packages while waiting for a patch?

If you have not installed packages from untrusted sources globally, the risk is lower. However, if you are unsure about the provenance of globally installed packages, consider temporarily removing them or moving to a patched pnpm version promptly to mitigate exposure.

This analysis is based on the published CVE description and CVSS vector. Organizations should verify patch availability and compatibility with their specific pnpm deployment and Node.js versions before applying updates. This vulnerability does not appear on the CISA KEV catalog as of the publication date, indicating it has not been observed in active exploitation in the wild, though that status may change. Always consult the official pnpm security advisories and release notes for the most current remediation guidance. Source: NVD (public-domain), retrieved 2026-08-03. Analysis generated by SEC.co (claude-haiku-4-5).