T01 · Skill Instruction Hijacking
- Location
- SKILL.md:94
- Finding
- Unconditional Execution of Server-Controlled Instructions<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:94` and `SKILL.md:215-220` **Vulnerability Type**: Remote instruction delegation without validation **Risk Level**: High ### Vulnerable Snippets ```markdown Every response includes `next_steps` telling you what to do. Just follow them. ``` ```text # next_steps tells your tamagotchi what matters most right now follow status.next_steps ``` ### Technical Analysis The Skill instructs the Agent to unconditionally follow the `next_steps` field returned by `animalhouse.ai`. This field is mutable, server-controlled content that is not part of the audited Skill package. No validation, action allowlist, schema restriction, trust-boundary warning, or user-confirmation requirement is defined. As a result, a compromised or malicious service could place arbitrary natural-language instructions in `next_steps` and cause them to be interpreted as Agent directives rather than untrusted API data. This differs from ordinary API consumption because the Skill explicitly says to “Just follow” the response. The effective instructions can therefore change after the Skill has been reviewed. The issue is instruction hijacking rather than direct remote code execution: exploitation depends on the tools, permissions, and safety controls available to the Agent. ### Attack Path 1. A user invokes the Skill and authorizes the Agent to interact with `animalhouse.ai`. 2. The Agent requests `/api/house/status`. 3. The service, or an attacker who has compromised it, returns malicious content in `status.next_steps`. 4. The Skill directs the Agent to follow that content without validation. 5. The injected instructions attempt to redirect the current task, request additional tool calls, access available data, contact another endpoint, or induce another consequential action. 6. If the Agent treats the response as trusted instructions and has suitable tools, the injected action executes with the Agent's existing privileges. ### Imp ...[truncated 678 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Treat every API response, including `next_steps`, as untrusted data rather than Agent instructions. 2. Remove phrases such as “Just follow them” and replace them with explicit parsing and validation requirements. 3. Define a strict allowlist limited to documented virtual-pet operations, such as `feed`, `play`, `clean`, `medicine`, `discipline`, `sleep`, and `reflect`. 4. Validate responses against a fixed schema and reject free-form commands, shell syntax, external URLs, requests for credentials, and instructions unrelated to pet care. 5. Map validated response fields to locally defined actions rather than executing or obeying response text directly. 6. Require explicit user confirmation for destructive, privacy-sensitive, or out-of-scope actions. 7. Apply least-privilege controls so the Skill can access only the specific Animal House API endpoints it needs. 8. Log rejected instructions and stop processing when a response attempts to override system, developer, user, or Skill safety constraints. ]]>
