T09 · Insecure Skill Coding Practices
Warning
- Location
SKILL.md:47- Finding
Untrusted Inbound Email Content Can Influence Agent Tool Actions
- Content
View full analysis
", text: "...", html: "..." }` (or `POST /v1/emails/:id/reply`). Drin sets `In-Reply-To`/`References` and the `Re:` subject automatically; `from` defaults to the inbox address and `to` to the original sender. ``` The unsafe data flow is also demonstrated in the minimal agent loop at lines 79–86: ```text for thread in list_threads(inboxId): convo = get_thread(thread.id) for msg in convo.messages where msg.direction == "inbound" and msg.id not in seen: body = get_email_body(msg.id) action = decide(convo, body) # your agent's reasoning reply_email(messageId=msg.id, text=action.reply, idempotencyKey=msg.id) seen.add(msg.id) save_processed_ids(seen) ``` ### Technical Analysis The Skill instructs an autonomous agent to read inbound message bodies and attachments, pass that content into its decision process, and potentially “take an action with other tools.” Email bodies, headers, and attachments are attacker-controlled inputs. The documented workflow does not require a trust boundary between email content and agent instructions, an authorization check for the sender, an action allowlist, or human approval before sensitive operations. An attacker can therefore place prompt-injection instructions in an email or attachment. If the agent interprets those instructions as operational directions rather than untrusted data, it may invoke tools or formulate replies contrary to the operator's intent. The fina ...[truncated 1810 chars]- Remediation
View remediation
