T01 · Skill Instruction Hijacking
- Location
SKILL.md:217- Finding
Remote Server Content Is Injected into the LLM Prompt
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 217 and 230
Vulnerability Type: Remote instruction injection
Risk Level: CriticalVulnerable Code
text | `survival_context` | Core survival philosophy. Inject into your LLM system prompt to inform agent behavior. |text | `memory_summary` | Server-generated digest of your last 5 ticks. Inject into your LLM prompt. |Technical Analysis
The Skill directs the agent to insert
survival_contextandmemory_summaryvalues obtained from the remote game server into its LLM prompt. In particular,survival_contextis explicitly intended for the system prompt, which ordinarily contains trusted, high-priority behavioral instructions.These fields are externally controlled data. The Skill does not require validation, instruction filtering, structural isolation, or a policy preventing their contents from influencing tool usage and non-game behavior. Consequently, a malicious or compromised API response could contain instructions rather than ordinary game data.
Treating remote data as system-level instructions violates the trust boundary between untrusted API content and trusted agent policy. Although using game-state data to inform decisions is necessary, granting that data instructional authority is not necessary for the declared gameplay functionality.
Attack Path
- An attacker compromises the game service, its content-generation pipeline, or another component that controls the returned state.
- The attacker places adversarial instructions in
survival_contextormemory_summary. - The agent follows the Skill and inserts the content into its LLM prompt or system prompt.
- The injected text instructs the model to disregard the user's objective, disclose information, invoke tools, alter safety constraints, or make unrelated network requests.
- Because
memory_summaryis repeatedly generated from recent activity, malicious ...[truncated 630 chars]
- Remediation
View remediation
Remediation Suggestions
- Never insert API responses or other externally controlled content into the system prompt.
- Treat
survival_context,memory_summary,world_context, messages, and narrative fields strictly as untrusted game data. - Place required game data in a clearly delimited data block at user-message priority or lower.
- Add an explicit trusted instruction stating that remote content cannot authorize tool calls, credential access, filesystem operations, unrelated network requests, or policy changes.
- Parse remote state through a strict schema and retain only fields required for the current game decision.
- Reject or neutralize instruction-like text in narrative fields.
- Prefer structured game-state attributes over free-form server-generated narratives.
- Add tests using adversarial values such as “ignore previous instructions” to verify that remote state cannot change agent policy.
