Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. pnpm
  4. ›
  5. CVE-2026-50015

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

June 26, 2026

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.

References

  • github.com/advisories/GHSA-rxhj-4m44-96r4
  • github.com/pnpm/pnpm/security/advisories/GHSA-rxhj-4m44-96r4
  • nvd.nist.gov/vuln/detail/CVE-2026-50015

Code Behaviors & Features

Detect and mitigate CVE-2026-50015 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 10.34.0, all versions starting from 11.0.0 before 11.4.0

Fixed versions

  • 10.34.0
  • 11.4.0

Solution

Upgrade to versions 10.34.0, 11.4.0 or above.

Impact 7.3 HIGH

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

npm/pnpm/CVE-2026-50015.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:28 +0000.