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-55700

CVE-2026-55700: Path Traversal and Arbitrary File Write in pnpm stage download

Alon Barad
Alon Barad
Software Engineer

Jun 27, 2026·4 min read·5 visits

Executive Summary (TL;DR)

Unsanitized 'name' and 'version' fields in downloaded package manifests allow arbitrary filesystem writes during 'pnpm stage download' operations.

A path traversal vulnerability in pnpm stage download allows malicious registries or compromised package manifests to overwrite arbitrary files on the victim's filesystem via unvalidated package name and version fields.

Vulnerability Overview

The pnpm stage download command fetches and stages tarballs from a designated package registry during staging operations. This process involves downloading a package tarball, extracting its embedded package.json manifest, and determining a local staging path to write the artifact. The attack surface is exposed to any network registry or upstream repository configured by the user.\n\nAn attacker who controls a registry or compromises an upstream package can supply a malicious manifest. By embedding directory traversal sequences in metadata fields, the attacker can hijack the target write location. This allows arbitrary file write or overwrite operations under the privileges of the active user executing the command.

Root Cause Analysis

The root cause of this vulnerability lies in the unvalidated trust placed in the version and name properties of the package manifest. During staging, pnpm extracts these fields to construct a local cache or staging filename. The application relies on normalizePackageName() to replace slashes and remove symbols, but it performs no validation on the version string.\n\nBecause the version field is untrusted input, an attacker hosting a malicious registry or publishing a compromised manifest can define a version containing traversal sequences. When path.resolve() dynamically resolves the absolute path using this unsanitized string, the resulting destination path escapes the designated download directory. This allows writing the tarball payload to an arbitrary location on the filesystem.

Code Analysis

The vulnerable logic resolves the output directory and file write path using the package name and version fields directly:\n\ntypescript\nconst downloadDir = opts.dir ?? process.cwd()\nconst outputPath = path.resolve(downloadDir, filename)\nawait fs.writeFile(outputPath, tarballData)\n\n\nmermaid\ngraph LR\n Registry[\"Malicious Registry\"] -->|\"package.json name/version\"| PNPM[\"pnpm stage download\"]\n PNPM -->|\"Unsanitized path.resolve\"| PathConcat[\"outputPath: /sandbox/../../etc/cron.d/job\"]\n PathConcat -->|\"fs.writeFile\"| OS[\"File Written Outside Sandbox\"]\n\n\nTo patch this vulnerability in commit 65443f4bdf1f0db9c8c7dc58fee25252607e9234, the maintainers introduced strict validation checks on the derived filename. The fix utilizes standard validation libraries to enforce format rules on both the package name and version before deriving the filename. Package names are validated using validate-npm-package-name, and semantic versions are validated using the semver validator, which blocks path traversal characters like / or .. from passing. Additionally, the path resolution step now enforces that the parent directory of the final absolute output path strictly matches the intended download directory.

Exploitation

An attacker exploiting this vulnerability must control the package registry or intercept the package response to inject a crafted manifest. When the victim executes pnpm stage download, the client issues a request to the configured registry.\n\nThe registry responds with a package payload containing a crafted package.json. In this manifest, the version field is set to a relative traversal path, such as 1.0.0/../../../../etc/cron.d/malicious_job.\n\nUpon receiving this response, pnpm builds the destination path using the malicious string and writes the tarball. The tarball's binary content is written directly to the target system path, enabling potential local privilege escalation (LPE) or persistent execution when the system triggers the written file.

Impact Assessment

The integrity impact is rated as High because an attacker can overwrite arbitrary files accessible to the execution context. Depending on whether pnpm is run by a standard user or an administrative CI/CD service, the impact ranges from local source code modification to full system compromise.\n\nThe availability impact is Low because overwriting critical system configuration or executable files can cause system services to fail. The vulnerability holds a CVSS v3.1 score of 7.1, reflecting that network-level positioning is sufficient to initiate the attack, provided user interaction (running the command) is achieved.\n\nCurrently, there is no active exploitation reported in the wild, placing the EPSS score at a low baseline. However, the presence of public regression tests acts as a functional Proof-of-Concept, making rapid exploitation feasible if target conditions are met.

Remediation

Users must update pnpm immediately to version 11.5.3 or higher. This release contains the complete structural and semantic verification mechanisms to block directory traversal payloads in both the package name and version fields.\n\nIf immediate patching is not possible, restrict network communication to trusted registries and verify that package registries employ robust metadata sanitization before distributing packages to downstream clients.

Fix Analysis (1)

Technical Appendix

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

Affected Systems

pnpm

Affected Versions Detail

Product
Affected Versions
Fixed Version
pnpm
pnpm
< 11.5.311.5.3
AttributeDetail
CWE IDCWE-22
Attack VectorNetwork
CVSS7.1
EPSS0.00258
ImpactHigh Integrity, Low Availability
Exploit Statuspoc
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1204.002User Execution: Malicious File
Execution
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 is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

References & Sources

  • [1]GitHub Pull Request #12303
  • [2]GitHub Security Advisory GHSA-v23m-ccfg-pq9h
  • [3]CVE-2026-55700 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

•about 5 hours ago•GHSA-WW5P-J6CJ-6MQQ
5.5

GHSA-WW5P-J6CJ-6MQQ: Credential Exposure in Nezha Dashboard DDNS and Notification APIs

GHSA-WW5P-J6CJ-6MQQ is a technical credential exposure vulnerability in Nezha Dashboard prior to version 2.2.5. The vulnerability allows authenticated administrative users or actors possessing scoped read-only Personal Access Tokens (PATs) to exfiltrate plaintext third-party API credentials, secret keys, and webhook authorization headers due to a lack of data redaction during API object serialization.

Amit Schendel
Amit Schendel
5 views•7 min read
•about 6 hours ago•GHSA-FR4H-3CPH-29XV
7.1

GHSA-FR4H-3CPH-29XV: Path Traversal and Directory Hijacking in pnpm and pacquet Dependency Resolution

GHSA-FR4H-3CPH-29XV is a high-severity path traversal vulnerability in pnpm and its Rust-based port pacquet. The flaw manifests when using the hoisted node-linker configuration, allowing an attacker to manipulate the lockfile to resolve relative traversal sequences or target reserved subdirectories, leading to arbitrary file write or execution hijacking.

Amit Schendel
Amit Schendel
5 views•8 min read
•about 9 hours ago•GHSA-72R4-9C5J-MJ57
7.1

GHSA-72R4-9C5J-MJ57: Arbitrary File Deletion via Path Traversal in pnpm patch-remove

A path traversal vulnerability in the pnpm package manager's 'patch-remove' command allows an attacker to delete arbitrary files outside the patches directory. By manipulating configuration files like package.json, an attacker can specify a traversal path that the application deletes recursively without validating the path's containment.

Alon Barad
Alon Barad
5 views•5 min read
•about 9 hours ago•GHSA-QRV3-253H-G69C
8.3

GHSA-QRV3-253H-G69C: Path Traversal and Arbitrary Symlink Creation via configDependencies in pnpm

A high-severity path traversal vulnerability exists in the pnpm package manager. By crafting a malicious lockfile (pnpm-lock.yaml) with path traversal characters in the configDependencies block, an attacker can create arbitrary directories and symlinks outside the project's node_modules/.pnpm-config directory. This exploitation happens automatically during pnpm installation, even when executing with scripts disabled via the --ignore-scripts flag.

Amit Schendel
Amit Schendel
5 views•7 min read
•about 11 hours ago•CVE-2026-49340
8.1

CVE-2026-49340: Arbitrary File Write via Path Traversal in Gonic Subsonic Playlist Handler

An arbitrary file write vulnerability exists in Gonic, a music streaming server implementing the Subsonic API. Due to an unreachable guard clause combined with missing path containment validation in the playlist storage engine, authenticated users can write playlist contents to arbitrary filesystem paths with overly permissive directory permissions.

Alon Barad
Alon Barad
8 views•7 min read
•about 13 hours ago•GHSA-985R-Q3QP-299H
8.8

GHSA-985R-Q3QP-299H: Incomplete Fix in phpMyFAQ Admin API Enables Privilege Escalation and Account Takeover

An incomplete mitigation of a predecessor vulnerability (GHSA-xvp4-phqj-cjr3 / CVE-2026-35671) in phpMyFAQ leaves sister administrative API endpoints vulnerable to Insecure Direct Object Reference (IDOR). Specifically, the `editUser` and `updateUserRights` endpoints lack object-level access controls, permitting authenticated low-privilege administrators to escalate their privileges or hijack SuperAdmin accounts.

Amit Schendel
Amit Schendel
10 views•6 min read