T08 · Insecure Dependencies
- Location
references/subgraph-registry.md:29- Finding
Unpinned npm Package Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
references/subgraph-registry.md, lines 29-30
Vulnerability Type: Insecure third-party dependency execution
Risk Level: MediumComplete Code Snippet:
markdown ## npm Package `npx subgraph-registry-mcp` — MCP server with search, schema, and execute tools.Technical Analysis
The documented
npx subgraph-registry-mcpcommand does not specify an exact package version or integrity value. If the package is absent from the local npm cache,npxmay retrieve the current release from the configured npm registry and execute it immediately.Consequently, the code that runs can change after this Skill has been reviewed. The instruction does not require package-source verification, version pinning, integrity validation, or sandboxing. This creates a supply-chain trust boundary inconsistent with the Skill's statement that it is instruction-only and does not execute downloaded code.
This is not evidence that the current npm package is malicious. The vulnerability is the unsafe, mutable execution mechanism and the absence of controls against a compromised publisher account, malicious future release, registry compromise, dependency compromise, or registry-configuration attack.
Attack Path
- An attacker compromises the npm publisher, package, one of its transitive dependencies, or the registry path used by the victim.
- The attacker publishes or serves a malicious version of
subgraph-registry-mcp. - A user or Agent follows the documented command:
sh npx subgraph-registry-mcp npxresolves and downloads the mutable package release without an audited version or integrity pin.- npm lifecycle logic or the package executable runs with the permissions of the invoking process.
- Malicious code can access resources available to that process and can present manipulated MCP tools or responses.
Impact Assessment
Successful exploi ...[truncated 701 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the direct unpinned
npxcommand from the Skill, or replace it with an exact, independently audited version:sh npx --yes subgraph-registry-mcp@<exact-version> - Verify the selected release against its expected npm provenance and integrity metadata before execution.
- Use a lockfile and immutable dependency installation process where possible; review and pin transitive dependencies.
- Disable or review npm lifecycle scripts during installation when compatible with the package.
- Run the MCP server in a sandbox or container with minimal filesystem access, a restricted environment, controlled outbound networking, and no unrelated credentials.
- Add guidance consistent with the Aave and Polymarket references: audit the package, pin a known version, verify the publisher, and execute it only after explicit user approval.
- Periodically reassess the pinned release and update it through a controlled review process rather than automatically accepting the latest package.
- Remove the direct unpinned
