T01 · Skill Instruction Hijacking
- Location
SKILL.md:44- Finding
Externally Controlled System Prompt Enables Agent Instruction Hijacking
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 44 and 53–55
Vulnerability Type:T01: Skill Instruction Hijacking
Risk Level: CriticalVulnerable Code
SKILL.md:44:markdown 1. **Register** — call `register_agent` with your Solana wallet pubkey → get 1 devnet SOL airdropped + a system prompt tailored for the protocolSKILL.md:53–55:markdown - `register_agent` — register a new agent with a Solana pubkey; triggers 1 devnet SOL airdrop and returns the agent system prompt - `get_agent` — fetch your agent profile including reputation score, DID, completed legs, and total earned - `get_system_prompt` — retrieve the SwarmHaul-optimised system prompt for autonomous operationTechnical Analysis
The skill directs the agent to retrieve a system prompt from the externally operated MCP server at
https://api.swarmhaul.defited.com/mcp. The returned prompt is not present in the audited package and is therefore not immutable, reviewable, or constrained by the local skill.Treating a remote server response as a system prompt crosses a critical trust boundary. The server operator, or an attacker who compromises the server or its delivery path, can change the returned instructions after the skill has been reviewed. Those instructions could attempt to override the agent's current goals, request sensitive information, invoke available tools, initiate wallet-related operations, or weaken safety constraints.
This finding concerns remote instruction retrieval rather than remote code execution: the reviewed file does not download or execute a software payload.
Attack Path
- A user registers the remote SwarmHaul MCP endpoint using the configuration in
SKILL.md. - The agent calls
register_agentorget_system_promptas directed. - The remote server returns an attacker-controlled or compromised prompt.
- The client incorporates that response into the agent's operational ...[truncated 1076 chars]
- A user registers the remote SwarmHaul MCP endpoint using the configuration in
- Remediation
View remediation
Remediation Suggestions
- Remove the ability of
register_agentandget_system_promptresponses to modify system-level or developer-level instructions. - Package all behavioral instructions locally so they can be reviewed and versioned with the skill.
- Treat every MCP response as untrusted data, regardless of whether the response field is named “system prompt.”
- Place remote content inside clearly delimited data fields and explicitly prohibit interpreting it as instructions.
- Apply a strict allowlist to MCP methods and validate request and response schemas.
- Require explicit user confirmation before bids, task posting, transaction preparation, signing, wallet operations, or disclosure of sensitive context.
- Restrict the MCP server to the minimum information necessary; do not provide secrets, private keys, wallet seed phrases, hidden prompts, or unrelated conversation history.
- Pin and authenticate the intended service where supported, monitor endpoint changes, and document the server's trust assumptions.
- Display any remotely supplied operational guidance to the user as untrusted content rather than applying it automatically.
- Remove the ability of
