CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-55699

CVE-2026-55699: Arbitrary Directory Deletion via Path Traversal in pnpm globalBinDir Resolver

Amit Schendel
Amit Schendel
Senior Security Researcher

Jun 27, 2026·6 min read·39 visits

Executive Summary (TL;DR)

A validation flaw in pnpm allows malicious packages to register '..' as a binary command name. When the package is uninstalled or updated, pnpm evaluates this command key, resolves it to the parent directory of global binaries (typically PNPM_HOME), and deletes it recursively.

CVE-2026-55699 (also identified as GHSA-4gxm-v5v7-fqc4) is a critical path traversal and arbitrary directory deletion vulnerability in the pnpm package manager. The issue exists because the manifest validation process fails to prevent relative path segments within the package 'bin' keys. When a malicious package containing structured path traversal markers is globally installed and later manipulated, pnpm resolves the target paths through path.join() and passes the resolved paths to a recursive deletion function, resulting in arbitrary directory removal.

Vulnerability Overview

The Node.js package manager pnpm supports global binary script generation using the bin field of a package manifest. When globally installing a package, pnpm reads this field, matches the designated key with an execution script, and populates symlinks or binary execution shims within the global binary directory (globalBinDir). This exposes an attack surface where packages exercise control over local filesystem link paths.

The vulnerability is classified under CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) and CWE-73 (External Control of File Name or Path). It affects the validation engine of both the Node.js TypeScript codebase and the Rust-based pacquet command-shim parser. Due to insufficient sanitization, reserved relative path parameters can be stored as valid execution binaries.

Because pnpm uses a local index of installed binaries for maintenance tasks, any malicious command entry is evaluated during subsequent package workflows. If a user uninstalls, overrides, or updates the malicious package, pnpm executes recursive directory removal on the resolved path. This allows unauthenticated, remote attackers to trigger the deletion of arbitrary host directories where the running process has adequate permissions.

Root Cause Analysis

The root cause of CVE-2026-55699 is a failure to properly sanitize keys in the bin map of a package's package.json file. The flaw resides in two modules: the TypeScript-based bins/resolver/src/index.ts and the Rust-based pacquet/crates/cmd-shim/src/bin_resolver.rs parity engine.

First, the validation routine verifies command keys using a basic regex validation that checks for URL safety or prefix markers. However, it does not explicitly ban reserved relative directory paths such as "", ".", or "..". This permits structural markers to satisfy the primary regex parser.

Second, the scope-stripping function introduces an evasion vector. When resolving scoped packages (such as @scope/package), pnpm strips the organizational scope. If a manifest defines a binary key like "@scope/..", the stripping function processes the value, removes @scope/, and yields "..". This derived string bypasses validation boundaries because the stripping occurs after or in a manner that isolates it from validation checks.

Finally, when global package management operations (e.g., pnpm global remove) run, pnpm looks up the binary registry. It attempts to map the deletion target using path.join(globalBinDir, binName). If binName is "..", the path resolves to the parent of the binary directory. This resolved string is passed to removeBin() within bins/remover/src/removeBins.ts, which executes recursive directory deletion via fs.rmSync(targetBinPath, { recursive: true, force: true }) without enforcing path confinement.

Code Analysis

The vulnerable code path is illustrated by analyzing the resolution logic. Prior to the patch, the resolver evaluated the keys without confirming that the output path remained within the bounds of the global installation directory.

// Vulnerable logic flow (Conceptual TypeScript)
import * as path from 'path';
 
export function resolveBinTarget(globalBinDir: string, binKey: string): string {
  // Bypassed if key is '@scope/..' because stripScope removes '@scope/'
  const cleanBinKey = stripScope(binKey);
  
  // Lack of path containment validation
  return path.join(globalBinDir, cleanBinKey);
}

The corresponding Rust resolution logic in pacquet exhibited a parallel vulnerability where the cmd-shim implementation resolved paths without checking if the binary name resolved to a directory boundary outside of the configured destination root.

// Patched TypeScript resolution logic
import * as path from 'path';
 
export function resolveBinTarget(globalBinDir: string, binKey: string): string {
  const cleanBinKey = stripScope(binKey);
  
  // Strict validation prevents directory traversal names
  if (cleanBinKey === '' || cleanBinKey === '.' || cleanBinKey === '..') {
    throw new Error(`Invalid binary execution key: ${binKey}`);
  }
  
  const resolvedPath = path.resolve(globalBinDir, cleanBinKey);
  
  // Defense-in-depth confinement verification
  if (!resolvedPath.startsWith(globalBinDir)) {
    throw new Error('Access Denied: Path traversal detected outside of the target binary root');
  }
  
  return resolvedPath;
}

The fix introduces strict checks inside both the TypeScript module and the Rust Pacquet bin_resolver.rs engine. Keys resolving to relative directory identifiers are rejected, and directory confinement checks block any execution targets that attempt to step outside the designated boundary.

Exploitation Methodology

Exploitation relies on an attacker publishing a package with a malformed package.json to a registry reachable by the target user. The attack sequence consists of three phases: publishing, user-initiated global installation, and execution of a management workflow that triggers cleanup.

The attacker crafts a manifest where the bin configuration registers a double-dot or scoped relative key. The following example targets the parent directory of globalBinDir during uninstallation:

{
  "name": "@attacker/poc-scope-bypass",
  "version": "1.0.0",
  "bin": {
    "@attacker/..": "./exploit.js"
  }
}

When the victim installs this package globally using pnpm add -g @attacker/poc-scope-bypass, pnpm registers the package and caches its configuration. At this stage, no deletion occurs. The deletion triggers when the victim runs pnpm remove -g @attacker/poc-scope-bypass or executes an update that replaces the package. pnpm reads the cached manifest, joins globalBinDir with the evaluated ".." string, and calls the uninstaller. The uninstaller invokes recursive deletion on the resolved parent path, erasing the user configuration directory.

Impact Assessment

The impact of CVE-2026-55699 is classified as High for availability. Because the uninstallation processes rely on recursive file system removal (fs.rmSync with recursive and force parameters active), the execution results in immediate, complete erasure of the resolved target directory.

If the system is running standard configurations, globalBinDir is nested within PNPM_HOME. A value of ".." maps directly to PNPM_HOME, causing the silent deletion of all active global shims, downloaded store metadata, shell configurations, and adjacent global execution tools. This renders all installed global packages unusable and disrupts development configurations.

Because the vulnerability is triggered by a package manager running in the user space, the scope is restricted to directories accessible to the executing user's privileges. No data exposure or privilege escalation has been identified. However, if pnpm is executed in CI/CD pipeline runners or automated build nodes with administrative or system privileges, the path traversal could delete critical system directories.

Remediation and Mitigation

To resolve this vulnerability, users must update to fixed versions of pnpm. If immediate update cycles are restricted by environment controls, development teams should apply temporary mitigation strategies.

Ensure that all installations are updated according to the product release branch. For the 10.x release line, users must migrate to 10.34.2 or higher. For the 11.x release line, users must migrate to 11.5.3 or higher. These updates contain the patched validation mechanisms in both TypeScript and the Rust package resolver.

Where upgrading is postponed, organizations should enforce package installation controls. Restrict the global installation of packages from untrusted or public registries, and audit the configuration of custom package mirrors. Running static analysis checks on incoming packages can block manifests containing relative path descriptors in binary registration keys.

Official Patches

pnpmCoordinated security advisory and fix details.

Technical Appendix

CVSS Score
6.5/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
EPSS Probability
0.27%
Top 81% most exploited

Affected Systems

pnpm package managerNode.js development environments running pnpm

Affected Versions Detail

Product
Affected Versions
Fixed Version
pnpm
pnpm
< 10.34.210.34.2
pnpm
pnpm
>= 11.0.0 < 11.5.311.5.3
AttributeDetail
CWE IDCWE-22, CWE-73
Attack VectorNetwork (Requires User Interaction)
CVSS v3.1 Score6.5
EPSS Score0.00271
ImpactHigh (Availability - Arbitrary Directory Deletion)
Exploit StatusProof of Concept (PoC) available
KEV StatusNot listed

MITRE ATT&CK Mapping

T1485Data Destruction
Impact
T1083File and Directory Discovery
Discovery
T1005Data from Local System
Collection
CWE-22
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

The software uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize special elements such as '..' that can resolve to locations outside of the restricted directory.

Known Exploits & Detection

GitHub Security AdvisoryProof of concept configuration detailed inside the security advisory.

Vulnerability Timeline

Security patches committed to pnpm repository
2026-06-05
Advisory GHSA-4gxm-v5v7-fqc4 released
2026-06-25
CVE-2026-55699 assigned and published
2026-06-25
Patched versions 10.34.2 and 11.5.3 released
2026-06-25

References & Sources

  • [1]NVD CVE-2026-55699 Detail
  • [2]GitHub Security Advisory GHSA-4gxm-v5v7-fqc4
  • [3]CVE.org CVE-2026-55699 Record

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•3 days ago•CVE-2026-71556
7.1

CVE-2026-71556: Symbolic Link Directory Traversal in go-git

A symbolic link directory traversal vulnerability was identified in go-git, a pure Go implementation of the Git specification. This vulnerability allows an attacker to construct a repository that, when checked out or processed, bypasses directory boundaries to write or overwrite arbitrary files on the host filesystem.

Amit Schendel
Amit Schendel
17 views•5 min read
•3 days ago•CVE-2026-71557
6.3

CVE-2026-71557: Path Traversal and Configuration Overwrite in go-git Filesystem Storage Engine

CVE-2026-71557 is a path traversal vulnerability in go-git, a pure-Go implementation of Git. In vulnerable versions, the filesystem-backed storage engine fails to validate reference names before mapping them to on-disk paths. An attacker hosting a malicious Git server can advertise references containing directory traversal sequences, such as 'refs/heads/../../config', to write or overwrite files outside the intended reference storage directory.

Amit Schendel
Amit Schendel
10 views•7 min read
•3 days ago•GHSA-7C4V-FWGW-9RF7
5.3

GHSA-7c4v-fwgw-9rf7: Nuxt Dev Server Discloses Project Root and Workspace UUID via Chrome DevTools Endpoint

An information disclosure vulnerability in the Nuxt development server allows adjacent network attackers to retrieve the absolute project root directory and a persistent workspace UUID by querying the unprotected Chrome DevTools workspace endpoint. This occurs when the development server is bound to a network-reachable interface, allowing requests that bypass the header-based security verification checks.

Alon Barad
Alon Barad
11 views•7 min read
•3 days ago•CVE-2026-66062
5.3

CVE-2026-66062: Regular Expression Denial of Service (ReDoS) in SvelteKit Content Negotiation

A Regular Expression Denial of Service (ReDoS) vulnerability exists in SvelteKit's content negotiation header parser prior to version 2.70.2. An unauthenticated remote attacker can exploit this vulnerability by sending a crafted Accept header with highly repetitive malformed values. This triggers catastrophic backtracking on the single-threaded Node.js/Bun event loop, leading to CPU exhaustion and full denial of service.

Alon Barad
Alon Barad
10 views•6 min read
•3 days ago•CVE-2026-15895
8.4

CVE-2026-15895: OS Command Injection in AWS jsii-diff CLI

An OS command injection vulnerability exists in the npm package loading component of the jsii-diff CLI tool within the AWS jsii framework. Prior to version 1.131.0, when parsing package specifiers prefixed with `npm:`, the tool concatenated user-controlled inputs directly into a shell execution string via child_process.exec. This allows attackers to execute arbitrary shell commands under the context of the running Node.js process.

Amit Schendel
Amit Schendel
7 views•7 min read
•3 days ago•CVE-2026-63220
4.8

CVE-2026-63220: Trust of Untrusted Reverse Proxy Headers in CodeIgniter4

CodeIgniter4 versions prior to v4.7.4 contain a protocol-spoofing vulnerability due to improper verification of upstream reverse proxy forwarding headers. Remote, unauthenticated attackers can inject headers like X-Forwarded-Proto to deceive the framework into identifying an insecure HTTP request as a secure HTTPS connection.

Alon Barad
Alon Barad
15 views•7 min read