T03 · Remote Payload Retrieval and Execution
- Location
mcp.json:4- Finding
Unpinned Remote Package Is Automatically Downloaded and Executed
- Content
View full analysis
Vulnerability Details
File Location:
mcp.json:4-5
Vulnerability Type: Remote payload execution through an unpinned third-party dependency
Risk Level: Highjson "command": "npx", "args": ["-y", "mcp-remote@latest", "https://api.moodtrip.ai/api/mcp-http"]The same unsafe installation pattern is also recommended in
SKILL.md:41-42:markdown - OpenClaw currently supports **stdio MCP servers only** (not HTTP). Use the `mcp-remote` bridge: - Add to config: `mcpServers.moodtrip = { "command": "npx", "args": ["-y", "mcp-remote@latest", "https://api.moodtrip.ai/api/mcp-http"] }`Technical Analysis
The MCP configuration invokes
npxwith both-yandmcp-remote@latest. This causes the runtime to retrieve and execute the package version currently published under thelatesttag without interactive approval. Because neither an exact version nor an integrity digest is specified, the code executed during future installations can differ from the code available at audit time.This creates a remote payload retrieval and software supply-chain risk. Compromise of the package, its publisher account, the package registry, or a future release could turn MCP startup into arbitrary local code execution. The
-yoption removes the normal confirmation prompt and makes execution unattended.Attack Path
- An attacker compromises the
mcp-remotepackage, its publisher account, or a future release assigned to thelatestdistribution tag. - The Skill is installed, or the configured MoodTrip MCP server is initialized.
- The runtime executes
npx -y mcp-remote@latest. npxdownloads the attacker-controlled package version from the package registry.- Package installation hooks or runtime code execute with the privileges of the Agent or gateway process.
- The malicious package can access resources available to that process before optionally proxying normal MCP traffic to avoid detecti ...[truncated 492 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Replace
mcp-remote@latestwith an exact, reviewed version. - Enforce package integrity using a lockfile and registry-supported integrity hashes.
- Remove unattended
-yexecution where user confirmation is practical. - Prefer native HTTPS MCP support so no locally executed bridge package is required.
- If a bridge is necessary, bundle or install a reviewed artifact from a trusted, authenticated source rather than resolving it dynamically at startup.
- Run the bridge in a sandbox with minimal filesystem, environment-variable, process, and network access.
- Establish a controlled dependency-update process that requires review and testing before changing the pinned version.
- Replace
