T01 · Skill Instruction Hijacking
- Location
scripts/webhook_server.js:75- Finding
Untrusted Email Content Is Delivered Directly to the Agent Message Channel
- Content
View full analysis
console.error(`[WAKE] Failed: ${err.message}`)); ``` ### Technical Analysis The `from` and `subject` properties originate from the webhook request body and are incorporated directly into a message delivered to an OpenClaw agent. Removing newlines and truncating the message to 200 characters protects neither against natural-language prompt injection nor against content that impersonates trusted operator instructions. Bearer authentication only proves that the requester knows the shared webhook secret. It does not establish that the supplied email fields are safe agent instructions. This is particularly relevant when the webhook producer processes arbitrary Internet email, where an external email sender may control the subject or sender display name without knowing the webhook secret. The implementation also differs from the documented wake mechanism. `SKILL.md` states that the server invokes `openclaw system event --mode now`, while the code invokes `openclaw agent --message ... --deliver`, creating a direct agent-message channel. ### Attack Path 1. An attacker sends an email with a crafted subject or sender display name to an address handled by the authorized webhook producer. 2. The producer submits the resulting email JSON with its valid webhook bearer token. 3. The server extracts the attacker-controlled `from` and `subject` ...[truncated 759 chars]- Remediation
View remediation
