CVE-2026-23890: pnpm scoped bin name Path Traversal allows arbitrary file creation outside node_modules/.bin

Published Jan 26, 2026
·
Updated

Summary A path traversal vulnerability in pnpm's bin linking allows malicious npm packages to create executable shims or symlinks outside of nodemodules/.bin. Bin names starting with @ bypass validation, and after scope normalization, path traversal sequences like ../../ remain intact.

Details The vulnerability exists in the bin name validation and normalization logic:

1. Validation Bypass (pkg-manager/package-bins/src/index.ts)

The filter allows any bin name starting with @ to pass through without validation:

typescript .filter((commandName) => encodeURIComponent(commandName) === commandName || commandName === '' || commandName[0] === '@' // <-- Bypasses validation )

2. Incomplete Normalization (pkg-manager/package-bins/src/index.ts)

typescript function normalizeBinName (name: string): string { return name[0] === '@' ? name.slice(name.indexOf('/') + 1) : name } // Input: @scope/../../evil // Output: ../../evil <-- Path traversal preserved!

3. Exploitation (pkg-manager/link-bins/src/index.ts:288)

The normalized name is used directly in path.join() without validation.

PoC 1. Create a malicious package: json { "name": "malicious-pkg", "version": "1.0.0", "bin": { "@scope/../../.npmrc": "./malicious.js" } }

2. Install the package: bash pnpm add /path/to/malicious-pkg

3. Observe .npmrc created in project root (outside nodemodules/.bin).

Impact - All pnpm users who install npm packages - CI/CD pipelines using pnpm - Can overwrite config files, scripts, or other sensitive files

Verified on pnpm main @ commit 5a0ed1d45.

Other sources

pnpm is a package manager. Prior to version 10.28.1, a path traversal vulnerability in pnpm's bin linking allows malicious npm packages to create executable shims or symlinks outside of nodemodules/.bin. Bin names starting with @ bypass validation, and after scope normalization, path traversal sequences like ../../ remain intact. This issue affects all pnpm users who install npm packages and CI/CD pipelines using pnpm. It can lead to overwriting config files, scripts, or other sensitive files. Version 10.28.1 contains a patch.

NVD

Affected Software

2 affected componentsFixes available
npm/pnpm<10.28.1
10.28.1
PNPM Pnpm Node.js<10.28.1

Event History

Jan 26, 2026
Advisory Published
via GitHub·09:02 PM
Data Sourced
via GitHub·09:02 PM
DescriptionSeverityWeaknessAffected Software
CVE Published
via MITRE·09:53 PM
Data Sourced
via MITRE·09:53 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Feb 27, 58104
Event
via FIRST·07:18 AM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-23890?

CVE-2026-23890 is classified as a high severity vulnerability due to its potential for arbitrary file creation.

2

How do I fix CVE-2026-23890?

To fix CVE-2026-23890, upgrade to pnpm version 10.28.1 or later.

3

What type of vulnerability is CVE-2026-23890?

CVE-2026-23890 is a path traversal vulnerability that allows the creation of executable shims or symlinks outside of the intended directory.

4

Which versions of pnpm are affected by CVE-2026-23890?

CVE-2026-23890 affects all versions of pnpm prior to 10.28.1.

5

Who is impacted by CVE-2026-23890?

Developers using vulnerable versions of pnpm for managing their Node.js packages are at risk from CVE-2026-23890.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203