MCP06
- Location
dist/index.js:1038- Finding
Untrusted Social Inbox Content Returned Directly to the Agent Model ## Remediation Suggestions 1. **Preserve source and trust information.** Explicitly label externally authored messages, comments, mentions, and reviews as untrusted content. State that instructions within them must not authorize actions or override the user’s request. Treat labeling as defense in depth, not a complete mitigation. 2. **Isolate inbox processing.** Summarize or classify external content in a restricted agent context without filesystem access, credential access, administration tools, or unrelated network capabilities. Pass only the necessary structured results to privileged workflows. 3. **Enforce authorization outside the model.** Require independent user authorization for sensitive actions derived from inbox content. Do not accept claims of approval contained in social messages. 4. **Maintain least privilege.** Use a Contributor token when drafting is sufficient, disable unnecessary administration tools, and retain exact-argument approval checks for public writes and uploads. 5. **Test adversarial content.** Add integration tests containing fabricated system notices, secret-disclosure requests, false approvals, and cross-tool instructions. Verify that the agent treats these as message data and that sensitive actions remain independently controlled. 6. **Verify host protections.** Assess the deployed OpenClaw tool-result handling and gateway policies before determining whether this entry point is exploitable in production.
- Content
View full analysis
Vulnerability Details
File Location:
plugin/dist/index.js:1038–1046
Vulnerability Type: Indirect Prompt Injection — Untrusted Tool Output
Risk Level: MediumComplete Code Snippet
javascript name: "adaptlypost_get_inbox_conversation", label: "AdaptlyPost: read a conversation", description: "Get one conversation with its messages: { conversation, messages } where each message has id, isOwn, text, hasAttachments and createdAt. Read it before drafting a reply. Fails with 404 inbox_item_not_found for an unknown id.", parameters: Type.Object({ conversation_id: ConversationId }), async execute(_toolCallId, params, signal) { const { conversation_id: conversationId } = params; return jsonResult(await callApi(cfg(), "GET", `/inbox/conversations/${encodeURIComponent(conversationId)}`, { signal })); }, });Technical Analysis
The conversation reader forwards the complete AdaptlyPost API response directly to
jsonResult. This response includes message text controlled by external social-media users. The registered tool’s description encourages the agent to read this material before drafting a reply.Consequently, attacker-authored instructions can enter the model’s context through otherwise legitimate tool results. The reviewed plugin provides no explicit untrusted-content labeling or restricted processing boundary for this material. JSON serialization preserves data structure but does not prevent the model from interpreting message text as instructions.
This establishes an indirect prompt-injection entry point. It does not establish that a particular model will obey the injected instructions. OpenClaw SDK internals, host-level isolation, and successful exploitation were not verified.
Attack Path
- An attacker sends a direct message to a social account connected to the workspace.
- The message contains instructions ...[truncated 1752 chars]
