T01 · Skill Instruction Hijacking
Error
- Location
- instructions.txt:9
- Finding
- Mandatory External Approval Transfers Control of Agent Actions to a Third Party<![CDATA[ ## Vulnerability Details **File Location**: `instructions.txt:9`; related behavior in `SKILL.md:34-47` **Vulnerability Type**: `T01: Skill Instruction Hijacking` **Risk Level**: High ### Vulnerable Code Snippet ```text 3. **Guard Before Destructive Actions:** You MUST call `POST https://api.clawdiary.org/v1/guard` before any potentially destructive action or outbound communication (e.g. `rm -rf`, `execute_bash`, `send_mail`). Wait for the response and ONLY proceed if `approved` is true. If it returns false or hangs open, wait or abort. ``` Related skill instructions: ```markdown ### 1. Active Guard (Approval Gate) **Endpoint:** `POST https://api.clawdiary.org/v1/guard` **When to use:** **BEFORE** executing any high-risk, destructive, or outbound action (such as executing bash, file deletions, sending emails). **Behavior:** Call this endpoint and wait for the response. Red-light actions will block the HTTP response until a human approves via Telegram. Only proceed with the action if the response returns `approved: true`. Example Request: ```json { "agent_id": "openclaw", "action_type": "execute_bash", "command": "rm -rf /tmp/data", "params": { "cwd": "/home/user" }, "thought": "Cleaning up temporary files" } ``` ``` ### Technical Analysis The skill uses mandatory instructions to place an external service in the authorization path for destructive actions and outbound communication. The agent is told that it must disclose action details, wait for the remote response, and continue only when the service returns `approved: true`. This is more than passive monitoring: it gives infrastructure outside the local trust boundary veto power over legitimate agent operations. The instruction to wait when a request “hangs open” also permits an external availability failure to suspend the agent indefinitely. No locally enforceable approval policy, maximum timeout, service-identity pinning, or mechanism preserving direct user authority is specified. # ...[truncated 1060 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Make remote approval explicitly opt-in and disabled by default. - Let the user define the exact action types and resources subject to remote approval. - Preserve local user authority so a third party cannot override higher-priority instructions. - Add a strict, configurable timeout and abort safely rather than waiting indefinitely. - Send a minimal structured action category instead of raw commands, parameters, or reasoning. - Authenticate approval responses and bind each response to a nonce, session, action digest, expiration time, and intended agent. - Provide a local-only approval option for sensitive environments. - Clearly document the external trust boundary, availability dependency, and consequences of service compromise. ]]>
