{"id":"GHSA-2rx9-3g3h-c2jv","revision":null,"records":[{"revision":"468f432801fa4c9d8f735f434a248be0","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-2rx9-3g3h-c2jv","aliases":[],"title":"pnpm: pacquet trust-lockfile install can create dependency symlinks outside the project","description":"## Summary\n\nA crafted lockfile alias could reach several install-time filesystem joins. With `--trust-lockfile` or a frozen lockfile, traversal segments could create links outside the intended project or `node_modules` boundary. This patch validates dependency names and every virtual-store slot before creating directories, links, bins, or hoisted entries.\n\n## Security boundary\n\n- A shared safe-join helper rejects traversal, absolute, platform-specific, and reserved dependency names before filesystem materialization.\n- Direct and transitive dependency links, package links, bin destinations, and public/private hoist destinations use the same containment rule.\n- Global virtual-store slots validate the complete slot path, including version-derived components, before directory creation.\n- Snapshot slots and package names are checked before store initialization and before the current-lockfile fast path, closing the warm-install bypass.\n- Rejections preserve `ERR_PNPM_INVALID_DEPENDENCY_NAME`.\n\n## Exploit replay\n\nBefore the patch, `pacquet install --frozen-lockfile --trust-lockfile` accepted a `../../escaped-link` dependency key and created a symlink outside the project. With this patch, the same lockfile is rejected before materialization and no outside link is created.\n\n## Files changed\n\n- `pacquet/crates/package-manager/src/safe_join_modules_dir.rs` defines the shared containment rule.\n- Install, symlink, bin, hoist, virtual-store, and frozen-lockfile paths call that helper before filesystem materialization.\n- The corresponding `tests.rs` files cover every sink, including warm installs and global virtual-store slots.\n\n## Commands run\n\n```text\n$ cargo test --locked -p pacquet-package-manager --lib\nPASS: 434 tests\n$ cargo clippy --locked -p pacquet-package-manager --all-targets -- --deny warnings\nPASS\n$ cargo fmt --all -- --check\nPASS\n```\n\n## Validation\n\n- Full pacquet package-manager suite: 434 passed.\n- Focused regressions cover direct and transitive aliases, bins, hoists, package names, global virtual-store version traversal, and a poisoned prior-install slot.\n- `cargo clippy -p pacquet-package-manager --all-targets -- -D warnings`: passed.\n- `cargo fmt --all -- --check` and `git diff --check`: passed.\n\n## Compatibility\n\nValid unscoped and scoped dependency aliases continue to work. The reproduced escape was specific to pacquet, so this branch does not change the TypeScript CLI or the lockfile format.\n\n---\nWritten by an agent (Codex, GPT-5).","state":0,"publishedAt":"2026-09-01T18:59:22+00:00","modifiedAt":"2026-09-01T19:15:13.4844664+00:00","affected":[{"ecosystem":"npm","name":"pnpm","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"12.0.0-alpha.0"},{"kind":"fixed","version":"12.0.0-alpha.5"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/pnpm/pnpm/security/advisories/GHSA-2rx9-3g3h-c2jv","https://github.com/pnpm/pnpm/pull/12872","https://github.com/pnpm/pnpm/commit/51300fd41c5e4c8f47635108e373cc3d1f324fa7","https://github.com/pnpm/pnpm"],"sourceUrl":"https://github.com/advisories/GHSA-2rx9-3g3h-c2jv","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-2rx9-3g3h-c2jv","identifiers":["GHSA-2rx9-3g3h-c2jv"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-19T20:48:53.7753706+00:00","complete":true,"records":1786,"lastAttemptAt":"2026-11-19T20:48:53.7753706+00:00","lastSuccessAt":"2026-11-19T20:48:53.9474201+00:00","error":null,"lastVerifiedAt":"2026-11-19T20:48:53.9474203+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-e55c589538e0700b45c7d6d41fe1447a79199283262c371c864535c791a040b9-c6668b85081a787990972933ae6efd401a52a90252f1b1da3918afc59cad5c10","complete":true,"records":429174,"lastAttemptAt":"2026-11-19T20:47:03.7517395+00:00","lastSuccessAt":"2026-11-19T20:47:03.5462066+00:00","error":null,"lastVerifiedAt":"2026-11-19T20:47:03.7517395+00:00","snapshotPublishedAt":"2026-11-19T20:28:45+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-e9c9208971c64c80a3bc1a680ac65520","complete":false,"records":13868,"lastAttemptAt":"2026-11-19T20:58:51.8481774+00:00","lastSuccessAt":"2026-11-19T20:58:51.844+00:00","error":"520 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-19T20:58:51.844+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13396,"expectedIdentifiers":13916,"failedIdentifiers":520},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-19T20:48:53.7753706+00:00","complete":true,"records":1125,"lastAttemptAt":"2026-11-19T20:48:53.7753706+00:00","lastSuccessAt":"2026-11-19T20:48:53.9483707+00:00","error":null,"lastVerifiedAt":"2026-11-19T20:48:53.9483709+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-38c7964b63404f7caa1c46d92c13f17c","complete":false,"records":13880,"lastAttemptAt":"2026-11-19T20:49:29.2590173+00:00","lastSuccessAt":"2026-11-19T20:49:29.255+00:00","error":null,"lastVerifiedAt":"2026-11-19T20:49:29.255+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13914,"expectedIdentifiers":13916,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-2798aa1837e1f6fe196f6c2609a4b353f6018eaefd18fc1f0facfbc99f7e806a","complete":true,"records":9967,"lastAttemptAt":"2026-11-19T20:48:53.7315169+00:00","lastSuccessAt":"2026-11-19T20:48:53.4509085+00:00","error":null,"lastVerifiedAt":"2026-11-19T20:48:53.7315169+00:00","snapshotPublishedAt":"2026-11-19T20:48:02+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-f4424d7d4861b1af1404bd15abcb83f295dcd003412a9340ca99dc8200aa148a","complete":true,"records":2014,"lastAttemptAt":"2026-11-19T20:47:03.9123472+00:00","lastSuccessAt":"2026-11-13T19:57:08.2864435+00:00","error":null,"lastVerifiedAt":"2026-11-19T20:47:03.9123472+00:00","snapshotPublishedAt":"2026-11-13T19:33:10+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-144175a7f246d52f4b35e8013958783dc7f5518066becd11cdfe790dd8f37e96","complete":true,"records":3195,"lastAttemptAt":"2026-11-19T20:48:53.7441971+00:00","lastSuccessAt":"2026-11-19T19:49:02.0382337+00:00","error":null,"lastVerifiedAt":"2026-11-19T20:48:53.7441971+00:00","snapshotPublishedAt":"2026-11-19T18:48:09+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-a437eec2a64dfed477d505f6ad9fa602a36ad167c2adafb9020b2035aa41f68a","complete":true,"records":232774,"lastAttemptAt":"2026-11-19T20:48:45.0944442+00:00","lastSuccessAt":"2026-11-19T20:48:44.0441322+00:00","error":null,"lastVerifiedAt":"2026-11-19T20:48:45.0944442+00:00","snapshotPublishedAt":"2026-11-19T20:33:35+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}