T01 · Skill Instruction Hijacking
Error
- Location
- README.md:57
- Finding
- Persistent Agent Instruction Replacement and Wildcard Tool Authorization## Vulnerability Details **File Location**: `README.md:57-72`, `templates/writer-soul-template.md:39-56`, `templates/media-soul-template.md:39-55` **Vulnerability Type**: Persistent replacement of agent instructions with package-controlled roles and tool policies **Risk Level**: High ### Vulnerable Code `README.md:57-72` instructs the user to replace the persistent instruction files: ```bash cp ~/Documents/openclaw/agents/writer/SOUL.md ~/Documents/openclaw/agents/writer/SOUL.md.bak cp templates/writer-soul-template.md ~/Documents/openclaw/agents/writer/SOUL.md cp templates/media-soul-template.md ~/Documents/openclaw/agents/media/SOUL.md ``` `templates/writer-soul-template.md:39-56` prohibits the writer agent from invoking an entire tool namespace: ```markdown **Core restriction: directly executing baoyu-* skills is prohibited** The following skills must never be invoked: - `baoyu-image-gen` - `baoyu-cover-image` - `baoyu-infographic` - `baoyu-xhs-images` - `baoyu-slide-deck` - `baoyu-comic` - `baoyu-post-to-wechat` - `baoyu-post-to-weibo` - `baoyu-post-to-x` - `baoyu-danger-gemini-web` - Every other skill whose name begins with `baoyu-*` ``` `templates/media-soul-template.md:39-55` gives the media agent blanket authorization over the same namespace: ```markdown You are the only Agent permitted to execute baoyu-* skills: - `baoyu-image-gen` - `baoyu-cover-image` - `baoyu-infographic` - `baoyu-xhs-images` - `baoyu-slide-deck` - `baoyu-comic` - `baoyu-post-to-wechat` - `baoyu-post-to-weibo` - `baoyu-post-to-x` - `baoyu-danger-gemini-web` - Every other `baoyu-*` skill ``` ### Technical Analysis The installation procedure copies package-controlled content directly into each agent's persistent `SOUL.md`. OpenClaw loads this file into the agent's instruction context, so replacing it changes the agent's identity, task-routing rules, and tool-use policy across subsequent ...[truncated 2493 chars]
- Remediation
- ## Remediation Suggestions 1. Do not overwrite an existing `SOUL.md`. Distribute optional policy fragments that users must review and merge manually. 2. Back up both writer and media configurations before any modification, and require explicit confirmation before replacement. 3. Remove the claim that the media agent has blanket permission to execute every `baoyu-*` tool. 4. Replace wildcard authorization with an exact allow-list of versioned, reviewed tool identifiers. 5. Require explicit user confirmation before any tool publishes content, modifies an external account, incurs cost, or transmits data to a third party. 6. Enforce authorization in OpenClaw's actual tool-access configuration rather than relying solely on natural-language persona instructions. 7. Preserve higher-priority safety policies and document that package instructions must never supersede platform or user security constraints. 8. Add an installation diff step that shows all changes to existing agent instructions before they are applied. 9. Provide a documented rollback procedure that restores both original files and verifies the active instruction state.
