pnpm: Arbitrary File Write/Delete via Malicious Patch File (Path Traversal) (CVE-2026-50015)
Description
pnpm versions prior to 10.34.0 and 11.4.0 contain a vulnerability in the patch application pipeline that allows an attacker to write or delete arbitrary files via malicious patch files with path traversal sequences. This occurs because the patch application does not validate file paths extracted from .patch files, enabling directory traversal outside the package directory during pnpm install. The vulnerability is fixed in versions 10.34.0 and 11.4.0.
CVSS v3.1
Score 7.3high
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's patch application pipeline (@pnpm/patch-package) before versions 10.34.0 and 11.4.0 does not validate file paths extracted from .patch files. An attacker contributing a malicious patch file containing diff --git header paths with '../../' sequences can cause arbitrary file write or deletion on the filesystem during 'pnpm install' executed by the user. This path traversal vulnerability allows modification of files outside the intended package directory. The issue is resolved in pnpm versions 10.34.0 and 11.4.0.
Potential Impact
An attacker who can contribute a malicious patch file (e.g., via a pull request) can exploit this vulnerability to write or delete arbitrary files on the filesystem with the privileges of the user running 'pnpm install'. This can lead to integrity and availability impacts on the affected system. There is no indication of confidentiality impact. No known exploits in the wild have been reported.
Mitigation Recommendations
Upgrade pnpm to version 10.34.0 or later, or 11.4.0 or later, where this vulnerability is fixed. Users should avoid applying untrusted patch files until patched versions are deployed.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BREW-pnpm-CVE-2026-50015
- Osv Schema Version
- 1.7.3
- Ecosystems
- ["Homebrew"]
- Cvss Version
- 3.1
Threat ID: 6ac2c0b02cdf04f656523907
Added to database: 10/04/2026, 21:10:08 UTC
Last enriched: 10/04/2026, 21:16:54 UTC
Last updated: 10/04/2026, 21:16:54 UTC
Views: 9
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.