Skip to content

v11: custom:* resolution type escapes npm lockfile resolution verifier #85

Closed as not planned

Description

@zkochan

Summary

In pnpm v11 (pnpm11/lockfile/verification/src/verifyLockfileResolutions.ts), the isRegistryShapedResolution shape check allows custom:* resolution types under registry-shaped dependency paths.

Because the npm resolution verifier skips all resolutions with a non-null type field (if (resolution.type) return), a lockfile can specify a custom:* resolution type under an npm package path. If the project uses a custom fetcher, that resolution will execute without passing registry verification.

Note: The Rust v12 resolver already rejects this.

Affected Components

  • pnpm11/lockfile/verification/src/verifyLockfileResolutions.ts

Suggested Fix

Disallow custom:* resolution types under registry-shaped package dependency paths in v11 verification.

Context

Originally reported in GHSA-hhhq-m9j2-4mxc by manus-pi.

Activity

  1. added 3 commits that reference this issue on Oct 5, 2026
    d15e21c
    db704a2
    a5073d4
  2. zkochan commented on Oct 5, 2026

    @zkochan
    MemberAuthor

    Closing as by design. A custom:* resolution is only installed by a custom fetcher that the project itself configured, and that fetcher is responsible for what it fetches, allowBuilds included. A fetcher should treat resolution fields from the lockfile as untrusted, for example by pinning integrity or deriving the source from pkgId. pnpm v11 keeps accepting custom:* resolutions under name@version keys. pnpm/pnpm#16611 keeps only the variations fix (#86).


    Written by an agent (Claude Code, claude-opus-5-5).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions