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
{{ message }}
Repository navigation
allow-remote should preserve path boundaries for path-qualified registries #9474
--allow-remote=none should allow tarballs that are genuinely served by the configured registry, but it should preserve the path boundary for path-qualified registries.
Today the registry tarball exception can treat a same-origin tarball outside the configured registry path as registry-provided.
Those are the same origin, but the tarball is outside the configured /npm/ registry path.
Why this matters
Path-qualified registries are common for private registry deployments and for npm auth scoping. npm's own .npmrc docs support path-scoped auth entries, and registry products commonly expose separate repositories under different paths on the same host.
When --allow-remote=none is used as an install-source restriction, a path-qualified registry should not allow an arbitrary sibling path on the same origin to satisfy the registry tarball exception.
Proposed fix
PR #9473 tightens the registry tarball exception so it requires:
same origin; and
the resolved tarball pathname to stay under the configured registry pathname, unless the configured registry is root-scoped.
Root-scoped registries have no path boundary to enforce, so origin match remains sufficient there.
Activity
Abhinav-143x commentedon Jun 4, 2026
Fixed by #9473, which has been merged. A release/v11 backport was also opened as #9489.