MCP07
- Location
plugin/dist/index.js:15596- Finding
Shared task access lacks ownership enforcement and chat delivery uses a global recipient ## Remediation Suggestions 1. Store an immutable owner, tenant, and originating session identifier when creating each task. 2. Derive caller identity from trusted gateway context, never from model-controlled arguments. 3. Apply ownership checks to listing, reading, delivery changes, replies, retries, expediting, cancellation, and bulk operations. 4. Reject delivery changes for nonexistent tasks or tasks outside the caller's authorization scope. 5. Persist a verified channel/account/conversation destination with each task; do not infer recipients from `allowFrom[0]`. 6. Default to queue-only delivery when the originating conversation cannot be resolved. 7. Add multi-user tests proving that task IDs cannot grant cross-user access and that completion delivery returns to the correct conversation.
- Content
View full analysis
Vulnerability Details
File Location:
plugin/dist/index.js:15596–15600,16589–16625,16767–16785
Vulnerability Type: Missing authorization and cross-session information disclosure
Risk Level: High when mutually untrusted users or sessions share the queueTechnical Analysis
The plugin stores tasks in a shared queue but does not enforce caller ownership in the reviewed task-reading and delivery-setting handlers.
The task status handler lists persisted tasks and selects a requested task solely by its ID:
javascript const tasks = scheduler.listPersistedTasks(); if (params.task_id) { const task = tasks.find((t) => t.taskId === params.task_id);The selected task's available prompt, result, and delivery record are returned without a caller-identity check.
The complete delivery-setting handler similarly accepts a task ID without verifying ownership or even task existence:
javascript async execute(params, _config, context) { captureOpenClawRuntime(context); const cfg = { modes: params.deliver, webhookUrl: params.webhook_url, filePath: params.file_path, format: params.file_format }; const error = validateDeliveryConfig(cfg); if (error) throw new Error(`set_delivery: ${error}`); await setDeliveryConfig(params.task_id, cfg); return { task_id: params.task_id, delivery: cfg }; }In addition, chat delivery selects a gateway-global Telegram recipient rather than the task's originating conversation:
javascript function telegramTarget(openclawConfig) { const tg = telegramConfig(openclawConfig); if (!tg?.enabled || !tg.botToken || !tg.allowFrom?.length) return void 0; return { token: tg.botToken, chatId: String(tg.allowFrom[0]) }; }Both
chatandtelegramuse this recipient-selection function.Confirmation boundary: These missing checks and the global routing behavior are confirmed in the plugin. Cross-user exploitation requires multiple trust domains to share the queue and acces ...[truncated 1347 chars]
