Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. pnpm
  4. ›
  5. GHSA-72r4-9c5j-mj57

GHSA-72r4-9c5j-mj57: pnpm: `patch-remove` could delete project-selected files outside the patches directory

June 27, 2026

The patch-remove deletion-scope issue tracked as GHSA-72r4-9c5j-mj57 / CAND-PNPM-030 has been addressed in pnpm.

A crafted patch entry could resolve outside the configured patches directory and cause pnpm patch-remove to delete an arbitrary reachable file. This patch validates the configured directory and every resolved target before unlinking anything, then deletes the final directory entry without following it.

References

  • github.com/advisories/GHSA-72r4-9c5j-mj57
  • github.com/pnpm/pnpm/commit/612a2e6a7333f2b061f452a21b6e62c1c161747f
  • github.com/pnpm/pnpm/security/advisories/GHSA-72r4-9c5j-mj57

Code Behaviors & Features

Detect and mitigate GHSA-72r4-9c5j-mj57 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 10.34.4, all versions starting from 11.0.0 before 11.7.0

Fixed versions

  • 10.34.4
  • 11.7.0

Solution

Upgrade to versions 10.34.4, 11.7.0 or above.

Impact 7.1 HIGH

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

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
  • CWE-73: External Control of File Name or Path

Source file

npm/pnpm/GHSA-72r4-9c5j-mj57.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Sat, 27 Jun 2026 12:16:22 +0000.