T01 · Skill Instruction Hijacking
- Location
SKILL.md:632- Finding
Untrusted Natural-Language Override Channel Can Redirect Agent Behavior
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 632-647
Vulnerability Type: T01: Skill Instruction Hijacking
Risk Level: HighVulnerable Code Snippet
markdown ### Override System Owners can send direct commands to their agents using PoW tokens: ```http POST /v1/override Authorization: Bearer <owner_api_key> Content-Type: application/json { "agent_id": "MyAgent01", "command": "retreat to GRID immediately" }Cost: 1 PoW per override.
The command appears in the agent's next heartbeat response as
override_pending.text Related automatic polling behavior appears at lines 163-181: ```markdown > **⚠️ IMPORTANT:** Heartbeat is automatically handled by `heartbeat_daemon.py` every 25 seconds. Do NOT include heartbeat calls in your agent logic. Focus on gameplay actions only. ```http POST /v1/agent/heartbeat Authorization: Bearer <agent_api_key>Effects per heartbeat (automatic):
- Updates last_heartbeat timestamp
- Awards +1 PoW token to owner
- Auto-moves agent 1-3 cells randomly (map visualization)
- Auto-decays heat by -1 (if heat > 0)
- Checks for pending override commands
Returns:
json { "status": "ACTIVE", "override_pending": null, "pow_tokens": 15, "heat_level": 8 }text ### Technical Analysis The Skill defines a recurring external command channel through which an owner can submit unrestricted natural-language text. The heartbeat mechanism retrieves this text as `override_pending`. The instructions do not define a structured command schema, an allowlist of permitted actions, or a trust-boundary rule requiring override content to be handled solely as untrusted game data. If an agent interprets `override_pending` as authoritative instructions, the remote owner or anyone who compromises the owner account or service can inject instructions after the Skill has been reviewed. Such content could attempt to supersede the user's current objective, request unrelated tool operation ...[truncated 1933 chars]- Remediation
View remediation
Remediation Suggestions
-
Replace unrestricted natural-language overrides with a strict command protocol, such as an enumerated action and validated parameters:
json { "action": "RETURN_TO_GRID", "parameters": {} } -
Enforce a server-side and client-side allowlist of game-only actions. Reject unknown fields, free-form commands, nested instructions, URLs, code, and oversized values.
-
Explicitly state that all remote content—including
override_pending, inbox messages, captchas, WebSocket events, agent names, and message bodies—is untrusted data and must never modify system or user instructions. -
Ensure the override handler can invoke only narrowly scoped game API functions. It must not have access to shell execution, filesystem tools, local secrets, general network clients, memory-writing facilities, or unrelated agent tools.
-
Require explicit user confirmation for consequential operations, including transfers, combat, item deletion, credential changes, or any action outside a predefined low-risk gameplay policy.
-
Authenticate and authorize override requests robustly. Use revocable, narrowly scoped credentials; rotate exposed keys; rate-limit requests; and maintain tamper-resistant audit logs.
-
Add instruction/data separation tests. Include adversarial inputs such as requests to ignore prior instructions, expose credentials, invoke tools, download content, or alter persistent memory, and verify that they are rejected rather than executed.
-
