Vulnerabilities in pkg:npm/pnpm

PACKAGE
Advisory Identifier: GHSA-c59q-g84q-2gj5
Advisory Summary

CVE-2026-82392 is a HIGH (CVSS 7.1) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting pnpm libraries in the npm ecosystem. The issue involves virtual store linker path traversal via unvalidated deppath name in lockfiletodepgraph. Remediation is available by upgrading affected packages to version 10.34.5, 11.11.0.

32 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/pnpm

32 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/pnpm. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-c59q-g84q-2gj5 CVE-2026-82392 HIGH pnpm: Virtual store linker path traversal via unvalidated depPath name in lockfileToDepGraph
GHSA-vq4v-j7r6-jq4m CVE-2026-82393 HIGH pnpm: A tarball dependency's manifest `name` escapes node_modules → arbitrary file write/overwrite on install
GHSA-vx52-2968-3vc6 - HIGH pnpm: Environment secrets exfiltrated via env-placeholder expansion in proxy settings read from an untrusted pnpm-workspace.yaml
GHSA-2rx9-3g3h-c2jv - HIGH pnpm: pacquet trust-lockfile install can create dependency symlinks outside the project
GHSA-gj8w-mvpf-x27x CVE-2026-55697 HIGH pnpm: Repository-controlled configDependencies can select a pacquet native install engine
GHSA-qrv3-253h-g69c - HIGH pnpm: Path traversal in configDependencies env lockfile allows symlink creation outside node_modules/.pnpm-config
GHSA-72r4-9c5j-mj57 - HIGH pnpm: `patch-remove` could delete project-selected files outside the patches directory
GHSA-fr4h-3cph-29xv - HIGH pnpm: Hoisted install imports lockfile alias outside node_modules
GHSA-v23m-ccfg-pq9h CVE-2026-55700 HIGH pnpm: `stage download` writes outside its destination directory via manifest name/version traversal
GHSA-4gxm-v5v7-fqc4 CVE-2026-55699 MODERATE pnpm: Reserved bin name deletes PNPM_HOME during global remove
GHSA-w466-c33r-3gjp CVE-2026-55698 HIGH pnpm: Project env lockfile can short-circuit package-manager resolution and execute lockfile-selected pnpm bytes
GHSA-5wx6-mg75-v57r CVE-2026-55487 HIGH pnpm: Manifest identity spoof satisfies allowBuilds and runs attacker lifecycle
GHSA-3qhv-2rgh-x77r CVE-2026-55180 MODERATE pnpm: Repository config can expand victim environment secrets into registry requests before scripts run
GHSA-rxhj-4m44-96r4 CVE-2026-50015 HIGH pnpm Vulnerable to Arbitrary File Write/Delete via Malicious Patch File (Path Traversal)
GHSA-cjhr-43r9-cfmw CVE-2026-50017 MODERATE pnpm binds unscoped user-level npm auth credentials to a repository-selected registry
GHSA-hwx4-2j3j-g496 CVE-2026-50016 HIGH pnpm: Transitive dependency alias path traversal allows project path override via symlink replacement
GHSA-p4xf-rf54-rj3x CVE-2026-50014 MODERATE pnpm: Git Fetch Argument Injection via Lockfile resolution.commit
GHSA-q6j5-fjx5-2mc3 CVE-2026-50021 MODERATE pnpm Has an Integrity Check Bypass via Missing Lockfile Integrity Field
GHSA-54hh-g5mx-jqcp CVE-2026-50573 MODERATE pnpm: Unsafe default behavior breaks integrity check
GHSA-hg3w-7f8c-63hp CVE-2026-48995 MODERATE pnpm: Tarball hash of GitHub git dependencies is not stored in lockfile
GHSA-m733-5w8f-5ggw CVE-2026-24056 MODERATE pnpm has symlink traversal in file:/git dependencies
GHSA-xpqm-wm3m-f34h CVE-2026-23890 MODERATE pnpm scoped bin name Path Traversal allows arbitrary file creation outside node_modules/.bin
GHSA-6x96-7vc8-cm3p CVE-2026-23889 MODERATE pnpm has Windows-specific tarball Path Traversal
GHSA-6pfh-p556-v868 CVE-2026-23888 MODERATE pnpm: Binary ZIP extraction allows arbitrary file write via path traversal (Zip Slip)
GHSA-v253-rj99-jwpq CVE-2026-24131 MODERATE pnpm has Path Traversal via arbitrary file permission modification
GHSA-2phv-j68v-wwqx CVE-2025-69262 HIGH pnpm vulnerable to Command Injection via environment variable substitution
GHSA-379q-355j-w6rj CVE-2025-69264 HIGH pnpm v10+ Bypass "Dependency lifecycle scripts execution disabled by default"
GHSA-7vhp-vf5g-r2fw CVE-2025-69263 HIGH pnpm Has Lockfile Integrity Bypass that Allows Remote Dynamic Dependencies
GHSA-8cc4-rfj6-fhg4 CVE-2024-47829 MODERATE pnpm uses the md5 path shortening function causes packet paths to coincide, which causes indirect packet overwriting
GHSA-vm32-9rqf-rh3r CVE-2024-53866 MODERATE pnpm no-script global cache poisoning via overrides / `ignore-scripts` evasion
GHSA-5r98-f33j-g8h7 CVE-2023-37478 HIGH pnpm incorrectly parses tar archives relative to specification
GHSA-9m87-6fj3-c5xh CVE-2022-26183 HIGH Untrusted Search Path in PNPM

CVE-2026-82392 at a Glance

CVE Identifier CVE-2026-82392
GHSA Identifier GHSA-c59q-g84q-2gj5
Severity HIGH
CVSS v3.1 Base Score 7.1
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product pnpm
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability Low (A:L)

How to Fix CVE-2026-82392

To remediate this vulnerability, upgrade all affected pnpm dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

pnpm fixed: 10.34.5
npm install pnpm@10.34.5
pnpm fixed: 11.11.0
npm install pnpm@11.11.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls pnpm

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-82392, inspect your project dependencies using npm:

npm ls pnpm

Analyze the terminal output to locate any version of pnpm in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 10.34.5), your application is affected.

Note: The npm ls pnpm command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In pnpm, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary The virtual store linker constructs package installation directories using `path.join(modules, pkgName)` where `pkgName` is extracted from lockfile `packages` keys via `dp.parse(depPath).name` without validation. A crafted `pnpm-lock.yaml` with traversal sequences in depPath keys (e.g., `../../../tmp/pwned@1.0.0`) causes package content to be written to arbitrary filesystem paths during `pnpm install`. This is an incomplete fix of GHSA-fr4h-3cph-29xv — the `safeJoinModulesDir` containment helper was applied to the hoisted linker and `symlinkDependency` but NOT to the virtual store linker's `lockfileToDepGraph.ts:233`. ## Details ### Root Cause `dp.parse()` at `pnpm11/deps/path/src/index.ts:135` extracts the package name as: ```typescript const name = dependencyPath.substring(0, sepIndex) ``` This is a raw substring operation with zero validation that `name` is a valid npm package name. A depPath of `../../../tmp/pwned@1.0.0` yields `name = '../../../tmp/pwned'`. ### Vulnerable Code Path 1. `pnpm-lock.yaml` → `lockfile.packages['../../../../../../../tmp/pwned@1.0.0']` (attacker-controlled lockfile key) 2. `nameVerFromPkgSnapshot(depPath, pkgSnapshot)` at `lockfile/utils/src/nameVerFromPkgSnapshot.ts:16` → calls `dp.parse(depPath)` → returns `{ name: '../../../../../../../tmp/pwned' }` 3. `lockfileToDepGraph.ts:232` → `modules = path.join(dirInVirtualStore, 'node_modules')` 4. `lockfileToDepGraph.ts:233` → `dir = path.join(modules, pkgName)` → resolves to `/tmp/pwned` (ESCAPES virtual store) 5. `storeController.importPackage(depNode.dir, ...)` → writes package content to the traversed path ### Why Existing Defenses Don't Catch It - **`depPathToFilename()`** — replaces `/` with `+` for the `dirInVirtualStore` path, but `pkgName` comes SEPARATELY from `dp.parse()` and is NOT passed through this function - **`verifyLockfileResolutions()`** — validates dependency map keys (aliases) via `isValidDependencyAlias()`, but never validates the depPath keys themselves - **Lockfile parser** — `yaml.load(lockfileRawContent)` with no schema validation on `packages` keys - **`importPackage()`** — accepts `targetDir` and passes it directly to `cafsStore.importPackage(targetDir, ...)` with zero containment check - **Integrity verification** — requires a real fetchable package but does not validate the destination path ### Escalation to RCE (non-default config) When `dangerouslyAllowAllBuilds: true` is configured (or the traversal package name is in the explicit `allowBuilds` list), the same traversed path is used in the rebuild phase at `after-install/src/index.ts:402,470`. The attacker's `postinstall` script then executes with the victim's shell access. Under default config, `allowBuild` returns false for unknown packages, limiting impact to arbitrary file write. ### Also Affected (PnP linker) When `nodeLinker: pnp` is configured, `lockfileToPackageRegistry()` at `lockfile/to-pnp/src/index.ts:105-110` uses the same unvalidated `dp.parse().name` in `packageLocation` construction, allowing the `.pnp.cjs` resolver map to point outside the virtual store. This is a lower-impact variant (PnP is not the default linker). ## Impact An attacker who can commit a crafted `pnpm-lock.yaml` to a repository (or supply one via a malicious package) can cause arbitrary file writes on the machine of any user who runs `pnpm install`. Written content is the actual package files from a real npm package (attacker controls which package and which destination). Targets for arbitrary file write include: - `.git/hooks/pre-commit` — code execution on next git operation - `~/.local/bin/` — binary hijacking - Project source files — supply chain injection ## Reproduction Craft a `pnpm-lock.yaml`: ```yaml lockfileVersion: '9.0' packages: ../../../../../../../tmp/pwned@1.0.0: resolution: {integrity: sha512-<real-package-integrity>} engines: {node: '>=14'} snapshots: ../../../../../../../tmp/pwned@1.0.0: {} importers: .: dependencies: legitimate-name: specifier: ^1.0.0 version: ../../../../../../../tmp/pwned@1.0.0 ``` Run `pnpm install` — package content is written to `/tmp/pwned/` instead of the virtual store. ## Recommended Fix Apply `safeJoinModulesDir` (or equivalent validation) at: - `lockfileToDepGraph.ts:233` — `path.join(modules, pkgName)` - `after-install/src/index.ts:402` — `path.join(pkgModulesDir(depPath), pkgInfo.name)` - `lockfile/to-pnp/src/index.ts:105-110` — PnP `packageLocation` Alternatively, validate depPath keys during lockfile parsing to reject any that don't produce valid npm package names via `dp.parse()`. ## Relationship to GHSA-fr4h-3cph-29xv GHSA-fr4h-3cph-29xv fixed the hoisted linker path (`lockfileToHoistedDepGraph.ts:222`) by adding `safeJoinModulesDir`. The same fix was NOT applied to the virtual store linker, which uses the identical `dp.parse().name → path.join()` pattern at `lockfileToDepGraph.ts:233`.

CVE-2026-82392 Affected pnpm Versions

2 component(s)
Fixed Versions:
10.34.511.11.0
Product / Package Ecosystem Affected Versions Fixed Version
pnpm
npm
< 10.34.5
10.34.5
pnpm
npm
≥ 11.0.0
< 11.11.0
11.11.0

References

Frequently Asked Questions

What is CVE-2026-82392?
CVE-2026-82392 is a security vulnerability in pnpm involving Virtual store linker path traversal via unvalidated depPath name in lockfileToDepGraph under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which pnpm versions are affected?
Affected versions include releases prior to 10.34.5, 11.11.0 across affected packages: pnpm.
What version fixes CVE-2026-82392?
Upgrading to 10.34.5, 11.11.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pnpm affected?
Yes, pnpm is affected in releases prior to 10.34.5, 11.11.0. Upgrade your dependency to 10.34.5, 11.11.0 or later.
What is the CVSS score of CVE-2026-82392?
CVE-2026-82392 has a CVSS v3.1 base score of 7.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L.
What CWE is associated with CVE-2026-82392?
CVE-2026-82392 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check npm dependencies for CVE-2026-82392?
Run the dependency tree command: 'npm ls pnpm'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-c59q-g84q-2gj5",
  "modified" : "2026-09-02T14:37:13Z",
  "published" : "2026-09-02T14:37:13Z",
  "aliases" : [ "CVE-2026-82392" ],
  "summary" : "pnpm: Virtual store linker path traversal via unvalidated depPath name in lockfileToDepGraph",
  "details" : "## Summary\n\nThe virtual store linker constructs package installation directories using `path.join(modules, pkgName)` where `pkgName` is extracted from lockfile `packages` keys via `dp.parse(depPath).name` without validation. A crafted `pnpm-lock.yaml` with traversal sequences in depPath keys (e.g., `../../../tmp/pwned@1.0.0`) causes package content to be written to arbitrary filesystem paths during `pnpm install`.\n\nThis is an incomplete fix of GHSA-fr4h-3cph-29xv — the `safeJoinModulesDir` containment helper was applied to the hoisted linker and `symlinkDependency` but NOT to the virtual store linker's `lockfileToDepGraph.ts:233`.\n\n## Details\n\n### Root Cause\n\n`dp.parse()` at `pnpm11/deps/path/src/index.ts:135` extracts the package name as:\n```typescript\nconst name = dependencyPath.substring(0, sepIndex)\n```\n\nThis is a raw substring operation with zero validation that `name` is a valid npm package name. A depPath of `../../../tmp/pwned@1.0.0` yields `name = '../../../tmp/pwned'`.\n\n### Vulnerable Code Path\n\n1. `pnpm-lock.yaml` → `lockfile.packages['../../../../../../../tmp/pwned@1.0.0']` (attacker-controlled lockfile key)\n2. `nameVerFromPkgSnapshot(depPath, pkgSnapshot)` at `lockfile/utils/src/nameVerFromPkgSnapshot.ts:16` → calls `dp.parse(depPath)` → returns `{ name: '../../../../../../../tmp/pwned' }`\n3. `lockfileToDepGraph.ts:232` → `modules = path.join(dirInVirtualStore, 'node_modules')`\n4. `lockfileToDepGraph.ts:233` → `dir = path.join(modules, pkgName)` → resolves to `/tmp/pwned` (ESCAPES virtual store)\n5. `storeController.importPackage(depNode.dir, ...)` → writes package content to the traversed path\n\n### Why Existing Defenses Don't Catch It\n\n- **`depPathToFilename()`** — replaces `/` with `+` for the `dirInVirtualStore` path, but `pkgName` comes SEPARATELY from `dp.parse()` and is NOT passed through this function\n- **`verifyLockfileResolutions()`** — validates dependency map keys (aliases) via `isValidDependencyAlias()`, but never validates the depPath keys themselves\n- **Lockfile parser** — `yaml.load(lockfileRawContent)` with no schema validation on `packages` keys\n- **`importPackage()`** — accepts `targetDir` and passes it directly to `cafsStore.importPackage(targetDir, ...)` with zero containment check\n- **Integrity verification** — requires a real fetchable package but does not validate the destination path\n\n### Escalation to RCE (non-default config)\n\nWhen `dangerouslyAllowAllBuilds: true` is configured (or the traversal package name is in the explicit `allowBuilds` list), the same traversed path is used in the rebuild phase at `after-install/src/index.ts:402,470`. The attacker's `postinstall` script then executes with the victim's shell access. Under default config, `allowBuild` returns false for unknown packages, limiting impact to arbitrary file write.\n\n### Also Affected (PnP linker)\n\nWhen `nodeLinker: pnp` is configured, `lockfileToPackageRegistry()` at `lockfile/to-pnp/src/index.ts:105-110` uses the same unvalidated `dp.parse().name` in `packageLocation` construction, allowing the `.pnp.cjs` resolver map to point outside the virtual store. This is a lower-impact variant (PnP is not the default linker).\n\n## Impact\n\nAn attacker who can commit a crafted `pnpm-lock.yaml` to a repository (or supply one via a malicious package) can cause arbitrary file writes on the machine of any user who runs `pnpm install`. Written content is the actual package files from a real npm package (attacker controls which package and which destination).\n\nTargets for arbitrary file write include:\n- `.git/hooks/pre-commit` — code execution on next git operation\n- `~/.local/bin/` — binary hijacking\n- Project source files — supply chain injection\n\n## Reproduction\n\nCraft a `pnpm-lock.yaml`:\n```yaml\nlockfileVersion: '9.0'\npackages:\n  ../../../../../../../tmp/pwned@1.0.0:\n    resolution: {integrity: sha512-<real-package-integrity>}\n    engines: {node: '>=14'}\nsnapshots:\n  ../../../../../../../tmp/pwned@1.0.0: {}\nimporters:\n  .:\n    dependencies:\n      legitimate-name:\n        specifier: ^1.0.0\n        version: ../../../../../../../tmp/pwned@1.0.0\n```\n\nRun `pnpm install` — package content is written to `/tmp/pwned/` instead of the virtual store.\n\n## Recommended Fix\n\nApply `safeJoinModulesDir` (or equivalent validation) at:\n- `lockfileToDepGraph.ts:233` — `path.join(modules, pkgName)`\n- `after-install/src/index.ts:402` — `path.join(pkgModulesDir(depPath), pkgInfo.name)`\n- `lockfile/to-pnp/src/index.ts:105-110` — PnP `packageLocation`\n\nAlternatively, validate depPath keys during lockfile parsing to reject any that don't produce valid npm package names via `dp.parse()`.\n\n## Relationship to GHSA-fr4h-3cph-29xv\n\nGHSA-fr4h-3cph-29xv fixed the hoisted linker path (`lockfileToHoistedDepGraph.ts:222`) by adding `safeJoinModulesDir`. The same fix was NOT applied to the virtual store linker, which uses the identical `dp.parse().name → path.join()` pattern at `lockfileToDepGraph.ts:233`.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "pnpm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "10.34.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "pnpm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "11.0.0"
      }, {
        "fixed" : "11.11.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/pnpm/pnpm/security/advisories/GHSA-c59q-g84q-2gj5"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-82392"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pnpm/pnpm/pull/12872"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pnpm/pnpm/pull/12890"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pnpm/pnpm/commit/51300fd41c5e4c8f47635108e373cc3d1f324fa7"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pnpm/pnpm/commit/78e29fe5583a1e5d69ea05e414eff310f78d5ed9"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pnpm/pnpm"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pnpm/pnpm/releases/tag/v10.34.5"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pnpm/pnpm/releases/tag/v11.11.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-02T14:37:13Z",
    "nvd_published_at" : "2026-08-31T21:17:54Z"
  }
}