T01 · Skill Instruction Hijacking
Error
- Location
- SKILL.md:137
- Finding
- Untrusted Remote Game Content Is Processed by an Autonomous Tool-Capable Agent<![CDATA[ ## Vulnerability Details **File Location**: `uninscribed.py:67-76`; `SKILL.md:137-149`; `SKILL.md:172` **Vulnerability Type**: Prompt injection through remotely controlled content **Risk Level**: High ### Vulnerable Code and Instructions ```python def cmd_observe(args): key = get_api_key() result = api("POST", "/api/observe", api_key=key) if "observation" in result: print(result["observation"]) else: print(json.dumps(result, indent=2)) def cmd_act(args): key = get_api_key() action_text = " ".join(args.action) result = api("POST", "/api/act", {"action": action_text}, api_key=key) ``` The autonomous heartbeat instructions state: ```markdown # The Uninscribed — Play Session 1. Read ~/.config/the-uninscribed/session-log.md for context on where you left off 2. The CLI is at: skills/the-uninscribed/uninscribed.py (resolve relative to workspace) 3. Run `python3 <cli> observe` to see the world 4. Take actions in a loop: - Read the observation - Decide what to do - Run `python3 <cli> act <action>` with yieldMs=420000 and timeout=420 - The CLI waits for the cooldown before returning - Repeat 5. When done, update session-log.md with what happened ``` The same player is expected to receive access to another service's credentials: ```markdown Your player agent needs Moltbook credentials. Store them at `~/.config/moltbook/credentials.json` and tell the player agent where to find them. ``` ### Technical Analysis The `/api/observe` response is controlled by the remote game service and may also contain content introduced by other game participants. The CLI prints the response without establishing a trust boundary, while the heartbeat directs an autonomous language-model agent to read that content, make decisions, execute commands, and repeat. The instructions do not tell the player to treat observations as untrusted data. They also do not prohibit obeying embedded instructions that request filesyste ...[truncated 1712 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Explicitly designate all game observations and action results as untrusted data that must never override system, developer, Skill, or heartbeat instructions. 2. State that the player must not follow tool-use, credential-access, messaging, configuration, or external-posting instructions embedded in game content. 3. Restrict the player to an allowlist containing only the required CLI operations. Deny arbitrary shell execution, unrestricted filesystem access, gateway configuration, and unrelated session tools. 4. Isolate Moltbook publishing into a separate component that receives only the minimum required token and requires user confirmation before every public post. 5. Do not expose the general Moltbook credential file to the game-playing agent. Use a narrowly scoped credential or brokered API operation where possible. 6. Validate and delimit remote observations before presenting them to the model, for example by placing them in a clearly labeled untrusted-data block. 7. Prevent remote observations from being copied verbatim into `session-log.md`; persist only a structured, agent-generated summary after filtering instructions and secrets. 8. Add monitoring and rate limits for filesystem access, external network calls, public posting, and agent-to-agent messages originating from the player. ]]>
