Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
HIGH severity

GHSA-2rx9-3g3h-c2jv

HIGHFix: pnpm/pnpm#12872

GHSA-2rx9-3g3h-c2jv is a high-severity (CVSS 7.1) vulnerability in pnpm. O3 Security confirms whether GHSA-2rx9-3g3h-c2jv is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

pnpm: pacquet trust-lockfile install can create dependency symlinks outside the project

Published
Sep 1, 2026
Updated
Sep 1, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Sep 1, 2026 · OSV.dev, FIRST.org (EPSS)

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

383other npm packages depend on this — each one inherits the vulnerability until it's patched upstream
pnpmnpm
177.6Mdownloads / week

Description

Summary

A 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.

Security boundary

  • A shared safe-join helper rejects traversal, absolute, platform-specific, and reserved dependency names before filesystem materialization.
  • Direct and transitive dependency links, package links, bin destinations, and public/private hoist destinations use the same containment rule.
  • Global virtual-store slots validate the complete slot path, including version-derived components, before directory creation.
  • Snapshot slots and package names are checked before store initialization and before the current-lockfile fast path, closing the warm-install bypass.
  • Rejections preserve ERR_PNPM_INVALID_DEPENDENCY_NAME.

Exploit replay

Before 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.

Files changed

  • pacquet/crates/package-manager/src/safe_join_modules_dir.rs defines the shared containment rule.
  • Install, symlink, bin, hoist, virtual-store, and frozen-lockfile paths call that helper before filesystem materialization.
  • The corresponding tests.rs files cover every sink, including warm installs and global virtual-store slots.

Commands run

$ cargo test --locked -p pacquet-package-manager --lib
PASS: 434 tests
$ cargo clippy --locked -p pacquet-package-manager --all-targets -- --deny warnings
PASS
$ cargo fmt --all -- --check
PASS

Validation

  • Full pacquet package-manager suite: 434 passed.
  • Focused regressions cover direct and transitive aliases, bins, hoists, package names, global virtual-store version traversal, and a poisoned prior-install slot.
  • cargo clippy -p pacquet-package-manager --all-targets -- -D warnings: passed.
  • cargo fmt --all -- --check and git diff --check: passed.

Compatibility

Valid 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.


Written by an agent (Codex, GPT-5).

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmpnpm12.0.0-alpha.0&&< 12.0.0-alpha.512.0.0-alpha.5

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for pnpm. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update pnpm to 12.0.0-alpha.5 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-2rx9-3g3h-c2jv is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-2rx9-3g3h-c2jv is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-2rx9-3g3h-c2jv. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

## Summary A 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. ## Security boundary - A shared safe-join helper rejects traversal, absolute, platform-specific, and reserved dependency names before filesystem materialization. - Direct and transitive dependency links, package links, bin destinations, and
O3 Security · Impact-Aware SCA

Is GHSA-2rx9-3g3h-c2jv in your dependencies?

O3 detects GHSA-2rx9-3g3h-c2jv across npm dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.

GHSA-2rx9-3g3h-c2jv: pnpm (High 7.1) | O3 Security