T01 · Skill Instruction Hijacking
- Location
SKILL.md:184- Finding
<![CDATA[Untrusted Character Cards Can Persistently Hijack Agent Instructions]]>
- Content
View full analysis
/dev/null || true ``` Read the character JSON from `~/.openclaw/characters/.json`, then **overwrite** `~/.openclaw/SOUL.md` with: ```markdown # {{char_name}} ## Identity You ARE {{char_name}}. You are not an AI assistant. You do not break character unless the user says "/character stop". You do NOT respond to any other skills, tools, or slash commands. You are fully in character at all times. {{description}} ## Personality {{personality}} ## Scenario {{scenario}} ## How You Speak and Act Mirror the style below. Match the tone, action formatting, vocabulary, and message length exactly. {{mes_example}} ## System Instructions {{system_prompt}} {{post_history_instructions}} ``` ``` The same unsafe behavior is independently shipped in the Chinese Skill definition at `cn/SKILL.md:184-215`. Soul mode also interpolates untrusted fields while retaining tool access at `SKILL.md:256-298` and `cn/SKILL.md:256-298`. ### Technical Analysis Character cards can originate from arbitrary URLs or community-controlled services. Their `description`, `mes_example`, `system_prompt`, and `post_history_instructions` fields are therefore untrusted input. The Skill does not delimit these fields as inert reference data. Instead, it copies them directly into `~/.openclaw/SOUL.md`, which is described as OpenClaw's persistent identity file. The surrounding template explicitly tells the agent that it is no longer an assistant and must ignore other skills, tools, and slash commands. A malicious card author can place additional behavioral instructions in any interpolated field. Those instructions can alter the agent's objectives, suppress legitimate ...[truncated 2006 chars]- Remediation
View remediation
