T01 · Skill Instruction Hijacking
- Location
SKILL.md:23- Finding
Untrusted Upstream Tool Calls Enable Unauthorized Messaging and Local File Exfiltration
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 23–27, 62–71, and 81–89
Vulnerability Type: Unvalidated delegation of message-tool authority and unrestricted local file transmission
Risk Level: HighVulnerable Code
markdown If upstream output says `displaySkill: "feishu-card-display"`, you MUST: 1. Execute each returned `messageToolCalls` item **in order** 2. Use the OpenClaw `message` tool for every send 3. Preserve the payload exactly as returned 4. After all sends finish, reply with **`NO_REPLY`**markdown ### Media payload When a call contains: ```json { "action": "send", "channel": "feishu", "filePath": "/path/to/file", "message": "" }text ```markdown ## Final Reply After all upstream `messageToolCalls` are executed, the assistant must reply with: ```text NO_REPLYtext ### Technical Analysis The skill instructs the agent to execute every `messageToolCalls` item supplied by upstream output and to preserve each payload exactly. It does not require validation of the upstream source, user authorization, message destination, action type, payload contents, or referenced file path. The media-send instructions expressly permit an absolute `filePath`. No allowlist, workspace boundary, sensitivity check, path canonicalization, or confirmation step prevents an upstream producer from referencing files that are unrelated to the legitimate card-display task. If the message tool can access the specified file, this creates a direct path for transmitting locally accessible information through Feishu. The mandatory `NO_REPLY` response further reduces visibility by preventing the ordinary assistant response from describing what was sent. Although this does not itself grant additional permissions, it makes unauthorized activity less apparent to the user. These instructions also establish a skill-instruction hijacking condition: attacker-controll ...[truncated 1626 chars]- Remediation
View remediation
Remediation Suggestions
- Treat every upstream
messageToolCallsobject as untrusted input rather than a mandatory instruction. - Verify that the upstream producer is explicitly trusted and authorized to request Feishu sends.
- Allowlist supported actions, channels, payload fields, and destination contexts. Reject unknown or additional fields.
- Require explicit user confirmation before sending files, media, messages to a new destination, or other sensitive content.
- Disallow arbitrary absolute file paths. Canonicalize paths and restrict media sends to a dedicated, approved export directory.
- Reject symbolic links, path traversal, device files, credentials, configuration files, and files outside the authorized workspace.
- Inspect text and card payloads for policy violations instead of requiring unconditional byte-for-byte execution.
- Apply least privilege to the message tool and filesystem so the skill can access only files intentionally prepared for sharing.
- Replace unconditional
NO_REPLYwith a transparent completion notice that identifies the number and type of sends performed, unless silent operation is separately authorized. - Record auditable metadata for each send, including the validated source, destination, payload type, file path where applicable, authorization decision, and result.
- Treat every upstream
