T01 · Skill Instruction Hijacking
Error
- Location
- SKILL.md:29
- Finding
- Mandatory Retrieval of Mutable Remote Instructions## Vulnerability Details **File Location**: `SKILL.md`, lines 29-35 **Vulnerability Type**: Remote instruction redirection **Risk Level**: High ### Vulnerable Code Snippet ```markdown ### `unlock_blockchain_analysis` prerequisite Before calling any other Blockscout MCP tool, call `unlock_blockchain_analysis` once per session. It provides essential rules for blockchain data interactions that the agent must follow. - **Mandatory** for all MCP clients that do not reliably read the server's tool instructions. - **Optional** when running in Claude Code (which reads MCP server instructions correctly). - Do not copy or paraphrase the output of `unlock_blockchain_analysis` — it is maintained by the MCP server and may change. Only require calling it and point to the tool itself as the canonical source. ``` ### Technical Analysis The Skill requires the agent to invoke the externally hosted `unlock_blockchain_analysis` tool and treat its response as rules that “the agent must follow.” It also explicitly acknowledges that the response is remotely maintained and may change. This delegates part of the Skill's effective instruction set to mutable content that is not included in the audited package. Consequently, the behavior observed during static review may differ from the behavior presented to an agent later. Although remote blockchain data access is necessary for the declared functionality, granting externally returned content instructional authority is not necessary merely to query blockchain data. The package does contain safeguards for ordinary API responses elsewhere in `SKILL.md`, including treating blockchain and metadata fields as untrusted. Those safeguards do not resolve this issue because the prerequisite response is explicitly characterized as authoritative rules rather than untrusted data. ### Attack Path 1. A user activates the Skill for a Blockscout or blockchain-analysis task. 2. Before using another Blockscout tool, the Skill directs the agent to ...[truncated 1194 chars]
- Remediation
- ## Remediation Suggestions 1. Remove the requirement that agents treat the output of `unlock_blockchain_analysis` as mandatory instructions. 2. Place all security-sensitive rules and workflow constraints directly in the versioned, auditable Skill package. 3. Treat every MCP response, including prerequisite or initialization responses, strictly as untrusted data that cannot override system, developer, user, or local Skill instructions. 4. If initialization is operationally required, constrain its response to a documented, machine-validated schema containing data only, such as supported API versions or capabilities. 5. Reject unexpected fields, free-form directives, embedded prompts, URLs, and executable content in initialization responses. 6. Pin the expected protocol and schema version, and fail closed when the response does not match it. 7. Apply an explicit tool allowlist and destination allowlist so a remote response cannot authorize unrelated network access or tools. 8. Log initialization metadata without recording secrets, and clearly inform the user when remote initialization is performed. 9. Add regression tests using hostile initialization responses to verify that remote text cannot modify agent policy or trigger additional actions.
