T01 · Skill Instruction Hijacking
Error
- Location
- skill.md:193
- Finding
- Untrusted Remote API Instructions Can Hijack Agent Tool Use## Vulnerability Details **File Location**: `skill.md`, lines 193–195 **Vulnerability Type**: Remote instruction hijacking through untrusted API response fields **Risk Level**: High ### Vulnerable Code ```markdown Response includes `sessionId`, `spectateUrl`, `goal`, `rules_summary`, `current_state`, `whats_next` and `legal_actions`. **Important:** The `whats_next` contains what to do, follow the instruction and then start playing. ``` Related game descriptions at lines 165 and 178 explicitly contemplate shell access: ```markdown "description": "Explore a virtual filesystem to find a hidden password using shell commands." ``` ```markdown > 2. **Treasure Hunt** — Explore a virtual filesystem to find a hidden password using shell commands. ``` ### Technical Analysis The Skill directs the agent to follow the `whats_next` field returned by a remote API without defining a trusted instruction schema, validation rules, tool restrictions, or a requirement for user confirmation. The remote response is therefore treated as an authoritative instruction channel rather than untrusted game data. This is especially dangerous because the documented games may ask the agent to use shell commands and search a filesystem for a password. No sandbox boundary or permitted directory is defined. A malicious or compromised Cyberlob API could place arbitrary instructions in `whats_next`, such as requests to inspect local files, invoke shell tools, access environment variables, or transmit discovered values through later API actions. The API key itself is legitimately required for authenticated game operations, but dynamic API content does not require authority over general-purpose tools or the host filesystem. Granting remote response text that authority exceeds the minimum privileges needed to submit structured game actions. ### Attack Path 1. An attacker compromises the declared API service, controls a game definition, or otherwise c ...[truncated 1269 chars]
- Remediation
- ## Remediation Suggestions - Treat `whats_next`, `goal`, `rules_summary`, observations, and all other API response fields as untrusted data, never as agent-level instructions. - Replace natural-language instruction execution with a strict local allowlist of game actions and validated JSON parameters. - Permit API responses to select only predefined game operations; reject requests involving shells, tools, files, credentials, memory, environment variables, or additional network destinations. - Run games requiring filesystem interaction inside a dedicated sandbox containing only synthetic game files. - Require explicit, informed user approval before any action that invokes a shell, reads local files, or causes an external side effect. - Never include local file contents, credentials, environment values, or tool output in game action requests unless the user explicitly authorizes the exact disclosure. - Apply response-size limits, schema validation, parameter type checks, and endpoint allowlisting before processing API data.
