GHSA-fr4h-3cph-29xv: pnpm Hoisted Install Imports Lockfile Alias Vulnerability
HIGHGHSA-fr4h-3cph-29xv is a HIGH (CVSS 7.1) hoisted install imports lockfile alias vulnerability (CWE-73: External Control of File Name or Path) affecting pnpm libraries in the npm ecosystem. The issue involves hoisted install imports lockfile alias outside node_modules. Remediation is available by upgrading affected packages to version 10.34.4, 11.7.0.
GHSA-fr4h-3cph-29xv at a Glance
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).
How to Fix GHSA-fr4h-3cph-29xv
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.
npm install pnpm@10.34.4
npm install pnpm@11.7.0
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 GHSA-fr4h-3cph-29xv, 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.4), 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-73: External Control of File Name or Path, where the product allows user input to control or influence paths or file names that are used in filesystem operations. 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
GHSA-fr4h-3cph-29xv Affected pnpm Versions
2 component(s)References
Frequently Asked Questions
What is GHSA-fr4h-3cph-29xv?
Which pnpm versions are affected?
What version fixes GHSA-fr4h-3cph-29xv?
Is pnpm affected?
What is the CVSS score of GHSA-fr4h-3cph-29xv?
What CWE is associated with GHSA-fr4h-3cph-29xv?
How can I check npm dependencies for GHSA-fr4h-3cph-29xv?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-fr4h-3cph-29xv",
"modified" : "2026-06-27T00:03:02Z",
"published" : "2026-06-27T00:02:51Z",
"aliases" : [ ],
"summary" : "pnpm: Hoisted install imports lockfile alias outside node_modules",
"details" : "## Summary\n\nThe hoisted dependency alias issue tracked as GHSA-fr4h-3cph-29xv / CAND-PNPM-059 has been addressed in both pnpm and pacquet.\n\nA crafted lockfile alias could be joined directly under a hoisted `node_modules` directory. Traversal aliases could escape that directory, while reserved aliases such as `.bin` or `.pnpm` could overwrite pnpm-owned layout. This patch validates package-name semantics and path containment before graph insertion or filesystem work.\n\n## Security boundary\n\n- The TypeScript hoisted graph uses the shared safe join helper at the actual `dep.name` sink.\n- The helper rejects traversal, absolute, platform-specific, and reserved package names.\n- Pacquet validates the hoister's `dep.0.name` before adding the graph node or recursing.\n- Both implementations return `ERR_PNPM_INVALID_DEPENDENCY_NAME`.\n- Pacquet uses the same dependency-name containment rule at its hoisted graph sink as it uses for direct dependency aliases.\n\n## Exploit replay\n\nBefore the patch, a traversal alias in a hoisted lockfile imported package files outside the intended install root. With this patch, both pnpm and pacquet reject the alias before graph insertion or filesystem work, and the escaped file is not created.\n\n## Files changed\n\n- `fs/symlink-dependency/src/safeJoinModulesDir.ts` provides the TypeScript containment helper.\n- `installing/deps-restorer/src/lockfileToHoistedDepGraph.ts` validates the parsed dependency name at the hoisted graph sink.\n- `pacquet/crates/package-manager/src/{hoisted_dep_graph.rs,safe_join_modules_dir.rs}` mirrors that boundary in Rust.\n- TypeScript and Rust tests cover traversal, reserved aliases, and valid scoped names.\n\n## Commands run\n\n```text\n$ pnpm --filter @pnpm/fs.symlink-dependency test\nPASS: 24 tests\n$ pnpm --filter @pnpm/installing.deps-restorer test test/index.ts\nPASS: exploit regression and positive install control\n$ cargo test --locked -p pacquet-package-manager --lib\nPASS: 426 tests\n$ cargo fmt --all -- --check\nPASS\n```\n\n## Validation\n\n- TypeScript symlink helper: 24 passed.\n- TypeScript exploit regression: 1 passed.\n- TypeScript positive hoisted-install control: 1 passed.\n- Targeted strict TypeScript compiles: passed.\n- Targeted ESLint: zero errors.\n- Pacquet helper tests: 3 passed.\n- Full pacquet package-manager library suite: 426 passed.\n- `cargo fmt`, parsed two-document lockfile validation, and `git diff --check`: passed.\n\n## Patch\n\nReady-for-review private PR: https://github.com/pnpm/pnpm-ghsa-fr4h-3cph-29xv/pull/1\n\nGitHub reports the branch as mergeable and has requested review from `zkochan`. GitHub intentionally does not run status checks on temporary private-fork PRs; the commands and outcomes above are the recorded local validation: https://docs.github.com/code-security/security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-security-vulnerability\n\n## Compatibility\n\nValid unscoped and scoped package aliases continue to work. The changeset covers `@pnpm/fs.symlink-dependency`, `@pnpm/installing.deps-restorer`, and `pnpm`; pacquet is updated in the same commit for CLI parity.\n\n---\nWritten by an agent (Codex, GPT-5).",
"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.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "pnpm"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "11.0.0"
}, {
"fixed" : "11.7.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/pnpm/pnpm/security/advisories/GHSA-fr4h-3cph-29xv"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pnpm/pnpm"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22", "CWE-73" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-27T00:02:51Z",
"nvd_published_at" : null
}
}