GHSA-72R4-9C5J-MJ57 is a high-severity path traversal vulnerability in pnpm (npm), affecting versions < 10.34.4. It is fixed in 10.34.4, 11.7.0.
Summary 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. Security boundary Traversal and absolute paths that resolve outside the configured patches directory are rejected before deletion. Parent directories are canonicalized before deletion, including the case where a nested symlink points outside and the final outside entry is itself dangling. The complete batch is validated before any file is removed. Component-aware predicates accept valid names beginning with .. while still rejecting parent traversal, Windows drive escapes, and UNC escapes. Valid files and symlinked patch directories whose canonical targets remain below the lockfile directory continue to work. A final symlink inside a valid patch directory is unlinked without following its target, including when the target is outside or dangling. Exploit replay Before the patch, a workspace patchedDependencies path that resolved outside the project caused pnpm patch-remove to delete the external sentinel. A second replay used a nested parent symlink and a dangling outside victim: realpath() returned ENOENT, yet the victim was still removed. With this patch, both paths are rejected and the outside entries remain intact. Files changed patching/commands/src/isSubdirectory.ts performs component-aware containment checks. patching/commands/src/patchRemove.ts validates the full batch, canonicalizes parents, and unlinks final entries without following them. patching/commands/test/{isSubdirectory,patchRemove}.test.ts covers traversal, nested symlinks, dangling victims, and valid removals. Commands run Validation Focused handler and path-predicate suites: 11 passed across 2 suites. Package-wide ESLint: passed. Package TypeScript build: passed. Commit hooks, Commitlint, and git diff --check: passed. The broader integration harness was environment-blocked because it writes outside the available temporary root; focused handler tests used /private/tmp. Patches 10.34.4: https://github.com/pnpm/pnpm/commit/352ae489f1b14ffdc19d2c6eacb1b06b098c2ddc 11.7.0: https://github.com/pnpm/pnpm/commit/612a2e6a7333f2b061f452a21b6e62c1c161747f Compatibility Missing patch files remain no-ops. Valid symlinked patch directories continue to work when their canonical target stays inside the lockfile directory, and final symlinks are removed without touching their targets. patch-remove is not yet in pacquet's command surface, so no Rust-side parity change is required. Remaining risk Portable Node APIs do not expose directory-fd-relative unlinkat(). A local attacker who can replace an already validated parent directory before the unlink may still win a time-of-check/time-of-use race. The reproduced repository-controlled traversal and symlink paths do not require that concurrent capability and are blocked by this patch. Written by an agent (Codex, GPT-5).
Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files. Typical impact: unauthorized file read or write outside the intended directory.
GHSA-72R4-9C5J-MJ57 has a CVSS score of 7.1 (High). The vector is network-reachable, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment.
A fixed version is available (10.34.4, 11.7.0). Upgrading removes the vulnerable code path.
npm
pnpm (< 10.34.4)pnpm (>= 11.0.0, < 11.7.0)pnpm → 10.34.4 (npm)pnpm → 11.7.0 (npm)Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter instead of chasing every advisory.
Kodem's runtime-powered SCA identifies whether GHSA-72R4-9C5J-MJ57 is reachable in your applications. Explore open-source security for your team.
See if GHSA-72R4-9C5J-MJ57 is reachable in your applications. Get a demo
Already deployed Kodem? See GHSA-72R4-9C5J-MJ57 in your environment →Upgrade the following packages to resolve this vulnerability:
pnpm to 10.34.4 or laterpnpm to 11.7.0 or laterKodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
GHSA-72R4-9C5J-MJ57 is a high-severity path traversal vulnerability in pnpm (npm), affecting versions < 10.34.4. It is fixed in 10.34.4, 11.7.0. Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files.
GHSA-72R4-9C5J-MJ57 has a CVSS score of 7.1 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
pnpm (npm) versions < 10.34.4 is affected.
Yes. GHSA-72R4-9C5J-MJ57 is fixed in 10.34.4, 11.7.0. Upgrade to this version or later.
Whether GHSA-72R4-9C5J-MJ57 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
pnpm to 10.34.4 or laterpnpm to 11.7.0 or later