CVE-2026-50016
Undergoing Analysis Undergoing Analysis - In Progress
Path Traversal in pnpm Package Manager

Publication date: 2026-06-25

Last updated on: 2026-06-25

Assigner: GitHub, Inc.

Description
pnpm is a package manager. Prior to 10.34.0 and 11.4.0, pnpm allows a transitive dependency alias from registry package metadata to contain path traversal segments. During install, pnpm later uses that alias as a filesystem path when linking dependency nodes. As a result, a registry package can cause `pnpm install --ignore-scripts` to replace paths in the current project with symlinks to attacker-controlled dependency package directories. This vulnerability is fixed in 10.34.0 and 11.4.0.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-06-25
Last Modified
2026-06-25
Generated
2026-06-26
AI Q&A
2026-06-25
EPSS Evaluated
N/A
NVD
EUVD
Affected Vendors & Products
Showing 4 associated CPEs
Vendor Product Version / Range
pnpm pnpm to 10.34.0|end_excluding=11.4.0 (exc)
pnpm pnpm to 11.4.0 (exc)
pnpm pnpm 10.34.0
pnpm pnpm 11.4.0
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-23 The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Compliance Impact

This vulnerability allows an attacker to replace critical project files or directories with symlinks to attacker-controlled locations, potentially leading to unauthorized modification or execution of code within a project.

Such unauthorized access and modification can compromise the confidentiality, integrity, and availability of data and systems, which are core principles in standards like GDPR and HIPAA.

By enabling attackers to silently rewire project paths and execute malicious payloads during normal operations (e.g., git commits, CI workflows), this vulnerability could lead to data breaches or unauthorized data manipulation, thereby impacting compliance with these regulations.

Executive Summary

This vulnerability exists in pnpm, a package manager, where prior to versions 10.34.0 and 11.4.0, a transitive dependency alias from registry package metadata could contain path traversal segments.

During installation, pnpm uses that alias as a filesystem path when linking dependency nodes. This means a registry package can exploit this by causing the command `pnpm install --ignore-scripts` to replace paths in the current project with symbolic links pointing to attacker-controlled dependency package directories.

This allows an attacker to manipulate the filesystem structure of the project by injecting symlinks to malicious locations.

Impact Analysis

This vulnerability can have severe impacts including high confidentiality, integrity, and availability risks.

An attacker can replace legitimate project paths with symlinks to attacker-controlled directories, potentially leading to unauthorized access, modification, or disruption of project files.

This can result in compromised project integrity, execution of malicious code, or denial of service within the development environment.

Mitigation Strategies

To mitigate this vulnerability, you should upgrade pnpm to version 10.34.0 or later, or 11.4.0 or later, where the issue has been fixed.

Detection Guidance

This vulnerability can be detected by checking for unexpected or suspicious symbolic links in your project directories, especially within `.git/hooks`, `.husky`, `scripts/`, or `.github/actions/` folders. These symlinks may point outside the intended `node_modules` directory to attacker-controlled locations.

You can use commands to find such symlinks and verify their targets. For example, running the following command in your project root can help identify symlinks that point outside the project directory:

  • find . -type l -exec ls -l {} +

To specifically check if any symlinks point outside the project directory, you can use a script or command to detect symlinks with targets containing path traversal segments or pointing outside the current directory.

  • find . -type l -exec readlink -f {} \; | grep -v "$(pwd)"

Additionally, reviewing your `pnpm-lock.yaml` or package metadata for dependency aliases containing path traversal segments (e.g., `@x/../../../../../.git/hooks`) can help detect malicious packages.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-50016. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart