T08 · Insecure Dependencies
- Location
SKILL.md:51- Finding
Unpinned npm Package Is Automatically Downloaded and Executed
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 51–54
Vulnerability Type: Supply-chain risk caused by automatic execution of a mutable third-party dependency
Risk Level: Mediumjson { "mcpServers": { "pipeworx-gbif": { "command": "npx", "args": ["-y", "mcp-remote@latest", "https://gateway.pipeworx.io/gbif/mcp"] } } }Technical Analysis
The MCP configuration invokes
npxwith the-yoption and identifies the third-party package asmcp-remote@latest. Thelatestnpm tag is mutable and does not identify a specific, previously reviewed release. The-yoption suppresses the normal installation confirmation, allowing the selected package version and its transitive dependencies to be downloaded and executed automatically.Consequently, the code executed by this configuration can change after the skill has been audited without any modification to
SKILL.md. If the npm package, a transitive dependency, its publisher account, or the relevant package-distribution infrastructure is compromised, a malicious release could execute during MCP server startup.Attack Path
- An attacker compromises the
mcp-remotepackage publication process, a maintainer account, or a transitive dependency. - The attacker publishes a malicious release and causes the mutable
latesttag to resolve to it. - A user or Agent loads the supplied MCP configuration.
npx -y mcp-remote@latestresolves and downloads the attacker-controlled release without requesting confirmation.- The downloaded package executes locally as the user running the Agent.
- Malicious package code accesses resources available to that process or performs unauthorized local and network operations.
Impact Assessment
Successful exploitation would provide code execution with the privileges of the account running the MCP process. Depending on the surrounding runtime restrictions, the malicious ...[truncated 313 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Replace
mcp-remote@latestwith a reviewed, exact package version rather than a mutable distribution tag. - Use a lockfile and verify package integrity through npm integrity metadata or an equivalent cryptographic verification mechanism.
- Avoid automatic installation during normal skill execution. Install and review the dependency as a controlled deployment step.
- Review and pin transitive dependencies where the deployment model permits.
- Monitor the pinned package and dependencies for security advisories, updating only after review and testing.
- Run the MCP bridge in a sandbox or container with minimal filesystem access, a sanitized environment, no unnecessary credentials, and restricted outbound network access.
- Execute the process under a dedicated, unprivileged account so a compromised package cannot inherit broader user or system permissions.
- Replace
