# CVE-2026-59194: pnpm path traversal in patch-remove command

Source: https://junglewise.ai/threats/cve-2026-59194-pnpm-path-traversal-in-patch-remove-command  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-06. Updated: 2026-07-06  
License: CC BY 4.0 with a link back

CVE-2026-59194 · Severity: high · CVSS 7.1 · Published 2026-07-06

pnpm is a popular JavaScript package manager used to install and manage software dependencies. A vulnerability in how it handles "patch" files allows a specially crafted project file to delete arbitrary files on a user's computer when they run the "patch-remove" command. This could lead to data loss or system instability if critical files are deleted.

Technologies: [pnpm (npm)](https://junglewise.ai/threats/technologies/pnpm). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-59194 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-59194 being exploited in the wild.

**How severe is CVE-2026-59194?** High severity, with a CVSS score of 7.1, published 6 July 2026.

**Which products and versions are affected?** pnpm (npm) SEMVER:introduced=0,fixed=10.34.4.

**Is there a fix for CVE-2026-59194?** Yes. pnpm (npm): upgrade to 10.34.4 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-59194 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-59194?** Check whether you run pnpm (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- pnpm (npm): upgrade to 10.34.4 or later

  ```sh
  npm install pnpm@10.34.4
  ```


## Technical details

A path traversal vulnerability (CWE-22) exists in the pnpm package manager's 'patch-remove' command. The root cause is improper validation of 'patchedDependencies' paths, which allows a crafted entry to resolve to locations outside the intended patches directory. An attacker can exploit this by providing a malicious project configuration that, when processed by a user running 'pnpm patch-remove', deletes arbitrary files reachable by the user's permissions. The vulnerability also involves improper handling of symlinks and dangling targets during the deletion process. This issue is fixed in versions 10.34.4 and 11.7.0 by implementing component-aware containment checks and canonicalizing parent directories before unlinking.

## Affected products

- pnpm pnpm < 10.34.4, >= 11.0.0 < 11.7.0

## Identifiers

- CVE-2026-59194
- GHSA-72r4-9c5j-mj57

## Timeline

- 2026-06-22: advisory: GitHub Security Advisory published
- 2026-07-06: disclosed: NVD publication date

## References

- [https://github.com/pnpm/pnpm/security/advisories/GHSA-72r4-9c5j-mj57](https://github.com/pnpm/pnpm/security/advisories/GHSA-72r4-9c5j-mj57)

## Related threats

- [pnpm environment secret exfiltration via proxy settings in workspace manifest](https://junglewise.ai/threats/pnpm-environment-secret-exfiltration-via-proxy-settings-in-workspace-f6626cca)
- [pnpm pacquet path traversal in lockfile dependency symlinks](https://junglewise.ai/threats/pnpm-pacquet-path-traversal-in-lockfile-dependency-symlinks-dc3f81d1)
- [pnpm tarball dependency manifest name path traversal arbitrary file write](https://junglewise.ai/threats/cve-2026-82393-pnpm-tarball-dependency-manifest-name-path-traversal-arbitrary)
- [pnpm virtual store linker path traversal via unvalidated depPath](https://junglewise.ai/threats/cve-2026-82392-pnpm-virtual-store-linker-path-traversal-via-unvalidated-deppath)
- [pnpm path traversal via crafted lockfile alias](https://junglewise.ai/threats/cve-2026-59196-pnpm-path-traversal-via-crafted-lockfile-alias)
