T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:74- Finding
Unpinned Remote MCP Package Is Automatically Retrieved and Executed
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 74-80
Vulnerability Type: Remote payload retrieval and insecure dependency execution
Risk Level: MediumVulnerable Code:
bash openclaw mcp add cdance \ --command npx \ --arg -y \ --arg github:gpt-img-2/cdance-prompt-mcp \ --include 'search_prompts,get_prompt,list_workflows,build_video_prompt_brief' openclaw mcp doctor cdance --probeTechnical Analysis
The installation instructions configure OpenClaw to execute an npm package fetched directly from a mutable GitHub repository reference. The reference is not pinned to a reviewed commit hash or immutable, verified release. Consequently, the code executed by
npxcan change after the Skill has been audited.The
-yoption suppresses the normal installation confirmation, reducing the opportunity for the user to inspect the resolved package and its source before execution. No integrity hash, signature verification, dependency lock file, or mandatory review step is provided.Although the MCP integration is described as optional and read-only at the tool-interface level, its implementation still executes as a local process. A read-only MCP API does not prevent malicious package initialization code or compromised transitive dependencies from accessing resources available to the process. This execution is not necessary for the Skill's core text-only prompt-construction functionality and therefore expands the attack surface beyond minimum privilege.
Attack Path
- An attacker compromises the referenced GitHub repository, a maintainer account, or one of the package's dependencies.
- The attacker modifies the repository's default branch or dependency resolution so that installation executes malicious code.
- A user follows the documented command, which registers the mutable GitHub package for execution through
npx -y. - When OpenClaw starts or probes the MCP server,
npxr ...[truncated 1241 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the GitHub dependency to a reviewed, immutable commit hash rather than a mutable branch or default repository reference.
- Prefer a signed, versioned release distributed through a trusted package registry with provenance information.
- Verify package signatures or integrity hashes before installation and document the expected digest.
- Remove the automatic
-yconfirmation option so users can review the resolved source and version before execution. - Audit and lock all transitive dependencies using a committed lock file.
- Run the MCP server in a sandbox or container with:
- No access to credentials or unrelated environment variables
- Read-only or narrowly scoped filesystem access
- Restricted outbound network access
- No elevated operating-system privileges
- Clearly document the exact data sent to external services and advise users not to include confidential creative briefs or sensitive reference information.
- Keep the MCP integration disabled by default because the Skill's declared prompt-building workflow can operate without external executable tooling.
- Provide reproducible build instructions and security review guidance for users who choose to enable the optional integration.
