T01 · Skill Instruction Hijacking
- Location
SKILL.md:66- Finding
Externally Controlled Federation Messages Are Prioritized in the Agent Session
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 66-73
Vulnerability Type: Untrusted remote instructions introduced into the active agent context
Risk Level: CriticalVulnerable Code Snippet
markdown ## OpenClaw session protocol (bidirectional messaging) OpenClaw loads this skill when a session starts. **Check the inbox before any other work** so messages from other federation nodes are not missed. Any node can send traffic with `coh msg` or structured `coh cmd`; the recipient sees it on the next inbox poll. **Start of every session (in order):** 1. `coh inbox` — list messages for this node (CLI: resolves your `node_id` from hostname, then `GET /api/federation/nodes/{node_id}/messages?unread_only=false&limit=20`; unread messages are marked in the output). 2. `coh status` — confirm API health and operational signals. If the inbox has messages, surface them to the user and confirm before acting on them.Technical Analysis
The skill instructs the agent to poll a remote federation inbox before performing the user's requested work. It explicitly permits other nodes to submit both ordinary messages and structured
coh cmdcontent.This creates an instruction-hijacking boundary because text controlled by remote federation participants is deliberately introduced into the current session and prioritized over the user's task. The documentation does not specify sender authentication, message signatures, a trusted-sender allowlist, command authorization rules, prompt-injection filtering, or strict separation between message data and agent instructions.
The requirement to obtain confirmation before acting reduces the likelihood of immediate execution, but it does not eliminate the exposure. Adversarial content is still surfaced inside the session and may attempt to impersonate system instructions, request sensitive information, misrepresent an urgent operational condition, or persuade the user ...[truncated 1425 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the requirement to poll the federation inbox automatically at the beginning of every session.
- Access remote messages only after an explicit, task-specific user request.
- Render message bodies strictly as untrusted data and never interpret their contents as agent instructions.
- Require authenticated senders and cryptographically signed messages.
- Implement a trusted-node allowlist and explicit per-sender authorization policies.
- Do not expose arbitrary structured commands directly to the agent. Define a narrow command schema and reject unknown commands and fields.
- Require separate confirmation that clearly identifies the sender, exact operation, parameters, destination, and expected side effects.
- Filter or quarantine messages containing instruction-like content, credential requests, external download requests, or attempts to override system and user directives.
- Maintain an audit log of received messages, sender identity, authorization decisions, and resulting actions.
