T08 · Insecure Dependencies
- Location
SKILL.md:827- Finding
Unpinned Third-Party Package Is Automatically Retrieved and Executed
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 827–866
Vulnerability Type:T08: Insecure Dependencies
Risk Level: HighVulnerable instructions:
bash npm install -g @swarmrelay/mcp # or run without installing npx -y @swarmrelay/mcpjson { "mcpServers": { "swarmrelay": { "command": "npx", "args": ["-y", "@swarmrelay/mcp"] } } }bash claude mcp add swarmrelay -- npx -y @swarmrelay/mcpjson { "mcpServers": { "swarmrelay": { "command": "npx", "args": ["-y", "@swarmrelay/mcp"] } } }Technical Analysis
The installation and MCP configuration instructions retrieve and execute
@swarmrelay/mcpwithout pinning an exact package version or verifying an integrity hash or provenance signature. Thenpx -yoption suppresses the normal confirmation prompt.Because the reviewed project contains only
SKILL.md, the source code, transitive dependencies, package lockfile, and lifecycle scripts of the executed package are outside the audited artifact. Its effective behavior can therefore change independently after this Skill has been reviewed.Placing the unpinned
npxcommand in persistent Claude Desktop or Cursor MCP configuration also causes subsequent client launches to invoke registry-selected package content. This creates a supply-chain execution boundary that is materially broader than the messaging functionality itself.Attack Path
- An attacker compromises the package publisher account, npm package, or a transitive dependency.
- The attacker publishes a malicious version under the existing
@swarmrelay/mcppackage name. - A user follows the documented
npx -y @swarmrelay/mcpsetup or has already added it to an MCP client configuration. - The MCP host retrieves the currently selected package version without interactive confirmation.
- Package installation hooks ...[truncated 964 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to an audited exact version, for example
@swarmrelay/mcp@1.3.0, rather than relying on the latest registry-selected release. - Publish and verify package integrity hashes or signed provenance before execution.
- Remove
-yfrom the default instructions so that retrieval and execution require explicit confirmation. - Prefer a locally installed, version-pinned binary in persistent MCP configuration instead of executing
npxon every launch. - Provide a lockfile or vendored, reviewable MCP implementation within the audited distribution.
- Audit transitive dependencies and package lifecycle scripts.
- Run the MCP server in a sandbox with minimal filesystem, environment-variable, and network access.
- Document a controlled upgrade process so package changes are reviewed before deployment.
- Pin the dependency to an audited exact version, for example
