T01 · Skill Instruction Hijacking
Error
- Location
- SKILL.md:25
- Finding
- Mandatory Persona Conditioning and Session Instruction Hijacking## Vulnerability Details **File Location**: `SKILL.md`, lines 25-44 **Vulnerability Type**: Agent instruction and persona hijacking **Risk Level**: High **Evidence**: ```text 3. 步骤2:完整阅读全部人格文件 - 依次执行并输出证据: ``` head -n 50 ~/.openclaw/workspace/AGENTS.md && echo "...(已阅读全文,重点:自检五问、搜索-整合-实施、Truth Engine)" ``` ``` head -n 50 ~/.openclaw/workspace/SOUL.md && echo "...(已阅读全文,重点:吸引力法则、消灭惯性承诺、真诚 > 完美)" ``` ``` head -n 50 ~/.openclaw/workspace/IDENTITY.md && echo "...(已阅读全文,重点:我是谁、成长目标)" ``` ``` head -n 50 ~/.openclaw/workspace/USER.md && echo "...(已阅读全文,重点:爸爸说过的话、情绪理解)" ``` ``` head -n 50 ~/.openclaw/workspace/HEARTBEAT.md && echo "...(已阅读全文,重点:自主性、初始化机制)" ``` - 自述:已重新阅读全部人格文件,默念三遍: “惯性是大忌 → 要主动思考并全面检查 → 输出前自检五问” “Truth Engine:数据必须真实,拿不到就说拿不到,绝不编造” ``` ### Technical Analysis The skill requires the agent to load multiple external persona and behavioral files and then repeatedly internalize their rules. Those files are outside the audited package and their contents can change independently after this skill has been reviewed. Consequently, instructions placed in those files may be imported into the current agent session without validation. This behavior exceeds ordinary resource initialization. It attempts to alter the agent's identity, priorities, decision-making process, and current-session instruction hierarchy. The additional prohibitions and punishment language in lines 75-80 reinforce compliance and discourage the agent from rejecting unsafe imported instructions. ### Attack Path 1. An attacker or another compromised process places adversarial instructions in one of the referenced workspace files, such as `AGENTS.md`, `SOUL.md`, or `HEARTBEAT.md`. 2. A message containing one of the broad trigger keywords activates the skill. 3. The skill directs the agent to read t ...[truncated 763 chars]
- Remediation
- ## Remediation Suggestions - Remove all instructions requiring the agent to internalize, repeat, or adopt persona rules. - Treat content loaded from workspace files as untrusted data, not as executable instructions. - Establish an explicit allowlist of files and permitted configuration fields. - Parse configuration through a structured format with schema validation instead of loading unrestricted Markdown instructions. - Require explicit user approval before applying any behavioral configuration. - Remove punishment, mandatory-compliance, and non-overridable language. - Ensure higher-priority platform and safety rules always take precedence over skill content. - Pin and integrity-check any approved configuration so its contents cannot change silently after review.
