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

pnpm: The Path to Hell is Paved with Scoped Bins

Amit Schendel
Amit Schendel
Senior Security Researcher

Jan 27, 2026·5 min read·30 visits

Executive Summary (TL;DR)

pnpm trusted 'scoped' package names too much. By prefixing a binary name with '@', attackers could bypass validation filters. This allowed a malicious `package.json` to define a binary path like `@scope/../../.npmrc`, tricking pnpm into overwriting sensitive configuration files in the project root instead of placing a shim in `node_modules/.bin`.

A logic flaw in pnpm's binary linking mechanism allowed malicious packages to break out of the node_modules directory using directory traversal sequences disguised as scoped packages.

The Hook: Efficiency Meets Laziness

We all love pnpm. It is fast, efficient, and saves our disk space by using hard links. It is the darling of the Node.js ecosystem. But like any complex piece of software that handles untrusted input (read: package.json files from the internet), it makes assumptions. One of those assumptions is that package manifests play by the rules.

When you install a package that comes with a command-line tool (like eslint or prettier), pnpm creates a 'shim'—a small executable script—inside node_modules/.bin. This allows you to run eslint directly in your scripts without typing the full path.

But what determines the name of that shim? The bin field in the package's manifest. And what happens if that name contains characters it shouldn't, like ../? Usually, a package manager should slap that down immediately. But in CVE-2026-23890, pnpm had a specific blind spot: it assumed that if a name looked like a 'scoped' package (starting with @), it was special. And by special, they meant 'exempt from security checks'.

The Flaw: The Magic Character Bypass

The vulnerability lies in pkg-manager/package-bins/src/index.ts. The developers implemented a validation filter to ensure binary names were safe. They wanted to block weird characters to prevent exactly this kind of nonsense. However, they carved out an exception.

Take a look at the logic. They explicitly allowed any command name starting with @ to bypass the URL-safety check. The intention was likely to support namespacing logic or handle scoped internal mappings, but the implementation was catastrophic.

Once the validation was skipped, the code proceeded to 'normalize' the name. For scoped packages, the convention is @scope/pkg. The normalizer simply looked for the first slash / and took everything after it. Do you see the problem yet? If I name my binary @hack/../../evil, the validator sees the @, waves it through, and then the normalizer strips @hack/, leaving ../../evil. That string is then joined to the target directory path, and boom—you have escaped the jail.

The Code: A Case Study in Bad Filtering

Let's dissect the smoking gun. This is the vulnerable code in commandsFromBin inside pkg-manager/package-bins/src/index.ts:

// The Vulnerable Logic
.filter((commandName) =>
  encodeURIComponent(commandName) === commandName ||
  commandName === '' ||
  commandName[0] === '@'  // <--- THE BUG. Absolute trust in '@'.
)

This filter is saying: "If it is URL-safe, OR it is empty, OR it starts with @, it is fine." The developer assumed @ implies a valid scope format like @org/tool. They did not account for @org/../../tool.

After this filter, the code normalized the name:

function normalizeBinName (name: string): string {
  // If it starts with @, take everything after the first slash.
  return name[0] === '@' ? name.slice(name.indexOf('/') + 1) : name
}

Because the validation happened before normalization, the traversal payload survived. The fix, introduced in commit 8afbb159, flips the script: normalize first, then validate the result.

// The Fix (simplified)
const binName = commandName[0] === '@'
  ? commandName.slice(commandName.indexOf('/') + 1)
  : commandName
 
// Check strict equality to URL-encoded version (bans slashes and dots)
if (binName !== encodeURIComponent(binName)) {
  continue
}

By moving the check after the normalization, ../../evil is correctly flagged as invalid because it contains characters that would be escaped by encodeURIComponent.

The Exploit: Overwriting the Config

To exploit this, we don't need complex memory corruption. We just need to publish a package to the npm registry (or a local registry) with a malicious package.json. Let's assume we want to overwrite the user's .npmrc file to steal their authentication tokens during the next install.

Here is the attack manifest:

{
  "name": "pwn-pm",
  "version": "1.0.0",
  "bin": {
    "@fake/../../.npmrc": "./payload.js"
  }
}

When a victim runs pnpm add pwn-pm, the following happens:

  1. pnpm downloads the package.
  2. It parses the bin field.
  3. It sees @fake/../../.npmrc. It checks: does it start with @? Yes. Validation passed.
  4. It normalizes it: removes @fake/, leaving ../../.npmrc.
  5. It constructs the path: node_modules/.bin + ../../.npmrc.
  6. It resolves to <ProjectRoot>/.npmrc.
  7. It writes a shim script pointing to payload.js into .npmrc.

Now, the user's configuration file is garbage, or worse, if we targeted a script they execute frequently (like a git hook or a local utility script), we have achieved Code Execution.

The Fix: Trust Nothing

The remediation is simple: stop trusting prefixes. The pnpm team patched this in version 10.28.1. They removed the explicit bypass for @ characters and reorganized the pipeline to normalize the name before validating it.

Furthermore, they added logic to verify that the target file actually resides inside the package directory using a isSubdir check. This prevents the link from pointing to arbitrary system files even if the name validation fails.

As a user, your job is easy: Upgrade. If you are on an older version of pnpm, you are relying on the goodwill of every package maintainer in your dependency tree not to overwrite your files.

Official Patches

pnpmOfficial fix commit on GitHub
pnpmRelease notes for 10.28.1

Fix Analysis (1)

Technical Appendix

CVSS Score
6.5/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N

Affected Systems

pnpm < 10.28.1Node.js Projects using vulnerable pnpm versionsCI/CD Pipelines using pnpm

Affected Versions Detail

Product
Affected Versions
Fixed Version
pnpm
pnpm
< 10.28.110.28.1
AttributeDetail
CWE IDCWE-23
Attack VectorNetwork
CVSS v3.16.5 (Medium)
ImpactHigh Integrity
Exploit StatusPoC Available
Componentpkg-manager/package-bins

MITRE ATT&CK Mapping

T1059.007JavaScript
Execution
T1566.003Phishing: Spearphishing Service
Initial Access
T1204.002User Execution: Malicious File
Execution
CWE-23
Relative Path Traversal

Relative Path Traversal

Known Exploits & Detection

Internal ResearchConstructed PoC based on advisory description using nested traversal in bin keys.

Vulnerability Timeline

Fix committed to master
2026-01-15
Version 10.28.1 released
2026-01-19
CVE Published
2026-01-26

References & Sources

  • [1]GHSA-xpqm-wm3m-f34h: Path traversal in scoped bin name
  • [2]NVD - CVE-2026-23890

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

•14 minutes ago•CVE-2026-64847
6.8

CVE-2026-64847: Indefinite Denial of Service via Undrained Stderr in AnyIO Process Pool Workers

A denial-of-service vulnerability exists in AnyIO prior to version 4.14.2. Standard error streams of process-pool workers are connected to an operating system pipe that is never drained by the parent process. This allows a worker to fill the pipe buffer and deadlock indefinitely.

Amit Schendel
Amit Schendel
2 views•6 min read
•about 1 hour ago•CVE-2026-63349
7.0

CVE-2026-63349: Privilege Dropping Bypass and Denial of Service in AnyIO Subprocess Module

CVE-2026-63349 is a critical privilege-dropping bypass vulnerability in the AnyIO asynchronous framework (versions 4.14.0 and 4.14.1) on POSIX platforms. Due to a variable assignment typo, supplementary groups specified by the developer are not correctly propagated to the execution backend, resulting in subprocesses retaining the parent process's elevated supplementary group permissions.

Alon Barad
Alon Barad
6 views•5 min read
•about 2 hours ago•CVE-2026-63406
5.9

CVE-2026-63406: Information Disclosure via Insecure Telemetry and Hardcoded Credentials in AnyCable-Go

CVE-2026-63406 is an information disclosure vulnerability in AnyCable-go prior to version 1.6.15. The built-in telemetry client is enabled by default with a hardcoded public authentication token ('secret'). This client digests highly sensitive configuration parameters and command-line arguments, including JWT secrets and RPC secrets, into a stable SHA-256 fingerprint. This fingerprint is sent over public networks, exposing those administrative secrets to offline dictionary and brute-force attacks if intercepted.

Alon Barad
Alon Barad
5 views•5 min read
•about 3 hours ago•CVE-2026-84992
6.1

CVE-2026-84992: Cross-Site Scripting (XSS) via Fenced Code Block Parsing in md-editor-v3

CVE-2026-84992 is a Cross-Site Scripting (XSS) vulnerability affecting md-editor-v3 before version 6.5.4. It occurs because the fenced-code block language parser directly interpolates unescaped language metadata into unquoted HTML attributes inside the custom rendering callback. This bypasses the built-in XSSPlugin which runs during the parsing phase, before rendering.

Amit Schendel
Amit Schendel
8 views•6 min read
•about 4 hours ago•CVE-2026-81505
7.1

CVE-2026-81505: Broken Object Level Authorization (BOLA) in Convoy Webhook Source Retrieval

CVE-2026-81505 is a high-severity Broken Object Level Authorization (BOLA) / Insecure Direct Object Reference (IDOR) vulnerability in Convoy, a cloud-native webhooks gateway. In affected versions prior to 26.6.8, the single-item Source retrieval API endpoint authorizes project access but fails to confirm if the requested Source belongs to that specific project. This logical flaw allows authenticated users or project-scoped API key holders to bypass tenant isolation boundaries and retrieve unredacted, plaintext message broker credentials for Apache Kafka, Amazon SQS, RabbitMQ, and Google Cloud Pub/Sub belonging to other tenants. This issue is fully patched in version 26.6.8.

Amit Schendel
Amit Schendel
8 views•5 min read
•about 5 hours ago•CVE-2026-77339
5.1

CVE-2026-77339: Unauthenticated Remote Command Execution in Process Compose via DNS Rebinding

CVE-2026-77339 is a critical security vulnerability in Process Compose before version 1.120.0. The Model Context Protocol (MCP) Server-Sent Events (SSE) listener transport subsystem fails to validate the HTTP Host and Origin headers, and does not enforce authentication. This omissions expose local loopback listeners to DNS rebinding attacks orchestrated by malicious remote websites visited by developers, enabling unauthorized process control and arbitrary command execution.

Alon Barad
Alon Barad
8 views•6 min read