pnpm has Path Traversal via arbitrary file permission modification (CVE-2026-24131)
Description
pnpm versions prior to 10.28.2 contain a path traversal vulnerability in handling the directories.bin field of packages. This flaw allows a malicious package to specify a path outside the package root, causing pnpm to change file permissions (chmod 755) on arbitrary files on Unix-like systems. Windows is not affected. The issue is fixed in version 10.28.2.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
pnpm, a package manager, improperly validates the directories.bin field in package manifests prior to version 10.28.2. It uses path.join() without ensuring the resolved path remains within the package root directory. A malicious npm package can exploit this by specifying a bin directory path that traverses outside the package root (e.g., "../../../../tmp"), leading pnpm to modify file permissions (chmod 755) on arbitrary files outside the intended directory. This vulnerability affects Unix, Linux, and macOS platforms but not Windows, due to platform-specific gating of the fixBin functionality. The vulnerability is addressed in pnpm version 10.28.2.
Potential Impact
An attacker publishing a malicious npm package can cause pnpm to change file permissions on arbitrary files outside the package directory on Unix-like systems. This could lead to unauthorized modification of file permissions, potentially enabling further exploitation or disruption of system files. Windows systems are not affected. There are no known exploits in the wild at this time.
Mitigation Recommendations
Users should upgrade pnpm to version 10.28.2 or later, where this path traversal and arbitrary permission modification vulnerability is patched. The vendor has provided an official fix, and upgrading is the recommended remediation.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BREW-pnpm-CVE-2026-24131
- Osv Schema Version
- 1.7.3
- Ecosystems
- ["Homebrew"]
- Cvss Version
- 4.0
Patch Information
Threat ID: 6ac2c0b02cdf04f65652390a
Added to database: 10/04/2026, 21:10:08 UTC
Last enriched: 10/04/2026, 21:17:04 UTC
Last updated: 10/05/2026, 06:48:15 UTC
Views: 10
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.