MCP07
- Location
plugin/dist/index.js:16410- Finding
Missing task-level authorization permits cross-user disclosure and delivery redirection on shared gateways ## Remediation Suggestions 1. **Persist authenticated ownership.** Associate every task and recurring job with a gateway-derived user or tenant identifier and its originating conversation. Do not accept ownership identities from model-controlled tool arguments. 2. **Enforce authorization on every operation.** Apply ownership checks to listing, detail retrieval, delivery changes, cancellation, deadline changes, replies, retries, and immediate execution. Filter records before returning them rather than exposing the shared queue and checking afterward. 3. **Authorize delivery changes atomically.** Require the target task to exist and belong to the caller before updating delivery settings. Perform the check and update transactionally where practical. Restrict administrative cross-user actions to explicit privileges. 4. **Bind chat delivery to the creator’s conversation.** Replace global `allowFrom[0]` selection with an authorized destination recorded at task creation. If no verified destination exists, retain the result in the queue instead of selecting another user. 5. **Handle legacy records conservatively.** Treat tasks without reliable ownership metadata as inaccessible to ordinary callers until an administrator explicitly assigns ownership or migrates them into an isolated queue. 6. **Constrain external delivery.** Consider administrator-approved webhook destinations and require authenticated approval for sensitive destination changes. Model-facing instructions to ask for confirmation are not a substitute for enforced authorization. 7. **Add multi-user regression tests.** Verify that one user cannot enumerate, read, redirect, cancel, or execute another user’s tasks. Test multiple Telegram recipients, shared CLI-created tasks, and legacy unowned records. 8. **Use deployment isolation as an interim mitigation.** Until ownership enforcement is implemente ...[truncated 129 chars]
- Content
View full analysis
Vulnerability Details
File Location:
plugin/dist/index.js:16410–16429— delivery configuration changes without task ownership verification.plugin/dist/index.js:16225–16294— shared queue enumeration and task-detail retrieval without caller-specific filtering.plugin/dist/index.js:15229–15340— global Telegram target selection and delivery configuration storage.
Vulnerability Type: Missing resource-level authorization; cross-session information disclosure.
Risk Level: High in multi-user deployments where mutually untrusted users share the plugin and queue without host-enforced isolation.
Vulnerable Code
The complete
set_deliveryexecution handler validates delivery parameters but does not verify task existence or the caller’s authority over that task:js 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 }; }Delivery configuration is stored solely under the supplied task ID:
js async function setDeliveryConfig(taskId, config) { const existing = await readRecord(taskId); await writeRecord(taskId, { ...existing, ...config }); }The scheduler’s persisted-task listing has no caller-specific filter:
js listPersistedTasks() { return this.store?.list() ?? []; }Chat delivery uses the first entry in the gateway’s Telegram allowlist rather than a recipient associated with the task’s creator:
js 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]) }; }Techn
...[truncated 3643 chars]
