CVE-2026-50015 pnpm: Arbitrary File Write/Delete via Malicious Patch File (Path Traversal)

High 7.3 Published Updated

Attackers can write or delete arbitrary files via malicious patch files during pnpm install, potentially leading to code execution.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-50015?

CVE-2026-50015 is a high-severity path traversal vulnerability in pnpm, published on 25 Jun 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

pnpm is a package manager. Prior to 10.34.0 and 11.4.0, pnpm's patch application pipeline (@pnpm/patch-package) performs no path validation on file paths extracted from .patch files. An attacker who contributes a malicious patch file via a pull request can write attacker-controlled content to or delete arbitrary files on the filesystem during pnpm install, as the user running the install. The diff --git header paths containing ../../ sequences traverse out of the package directory, and the traversal is difficult to catch in code review because patch file diff headers are opaque to most reviewers. This vulnerability is fixed in 10.34.0 and 11.4.0.

Weakness: CWE-22

Which versions are affected by CVE-2026-50015?

4 open source packages ship an affected version, including pnpm. It affects 1 product.

PackageAffectedFixed in
pnpm npmAll versions10.34.0
pnpm npmAll versions10.34.0
pnpm npmFrom 11.0.011.4.0
pnpm npmFrom 11.0.011.4.0

Products include Pnpm Pnpm.

How do I fix CVE-2026-50015?

Upgrade pnpm to a fixed version for your release line: 10.34.0 or 11.4.0.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-50015 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-50015 exists.

Sources

Also known as GHSA-rxhj-4m44-96r4, MINI-vjgq-m5gq-8882, ROOT-APP-NPM-CVE-2026-50015.

Is CVE-2026-50015 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free