You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When installing a Git dependency with a #path: subpath fragment (e.g. git+https://github.com/org/repo.git#path:packages/subpkg), pnpm11/exec/prepare-package/src/index.ts uses safeJoinPath to ensure the target package path stays within the cloned repository root.
However, safeJoinPath only checks the containment of the final resolved path component. If intermediate path segments contain a symlink pointing outside the cloned repository directory, pnpm dereferences the symlink and copies files from the external directory into the content-addressable store.
This task is now covered by pnpm/pnpm#16612, which merged into main during this work. The duplicate git-subpath fix and changeset have been removed from pnpm/pnpm#16613 during its rebase.
Activity
zkochan commentedon Oct 5, 2026
This task is now covered by pnpm/pnpm#16612, which merged into main during this work. The duplicate git-subpath fix and changeset have been removed from pnpm/pnpm#16613 during its rebase.
Written by an agent (Codex, GPT-6).
fix(prepare-package): prevent intermediate symlink traversal in subpa…
fix(prepare-package): prevent intermediate symlink traversal in subpa…