Back to plugin

Security audit

Tidegap — carbon-aware deferral

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marked tidegap suspicious because scanners report weak task access controls, unrestricted webhook requests, and report writes to gateway-writable paths.

Before installing, consider whether you trust every user or agent that can access the shared queue, and whether the gateway has access to sensitive internal services or files. The scanner notes that host isolation can reduce the cross-user risk, but the reported webhook and file-write risks still depend on the gateway’s network and file permissions.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (3)

MCP07

Error
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 queue

Technical 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 chat and telegram use 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]

other

Warning
Location
plugin/dist/index.js:15931
Finding

Unrestricted webhook delivery permits gateway-originated requests to internal services ## Remediation Suggestions 1. Require administrator-approved webhook destinations or registered destination identifiers. 2. Permit only approved protocols, preferably HTTPS, and reject embedded URL credentials. 3. Resolve destination addresses and reject loopback, private, link-local, unspecified, and other prohibited address ranges, including IPv6 equivalents. 4. Disable redirects or validate every redirect target using the same destination policy. 5. Enforce outbound network restrictions independently of application validation. 6. Set explicit connection and total-request timeouts. 7. Require trusted user approval for new destinations and clearly disclose which task content will be transmitted. 8. Test alternate IP representations, DNS changes, and redirects to prohibited addresses.

Content
View full analysis

Vulnerability Details

File Location: plugin/dist/index.js:15931–15958; tool-controlled configuration at 16767–16785
Vulnerability Type: Server-side request forgery and unrestricted outbound result delivery
Risk Level: Medium

Technical Analysis

The tools accept a webhook URL, while delivery validation only requires that the URL value be nonempty. The complete request handler passes that value directly to fetch:

javascript
async function deliverWebhook(task, url) {
  try {
    const res = await fetch(url, {
      method: "POST",
      headers: { "content-type": "application/json" },
      body: JSON.stringify({
        source: "tidegap",
        task_id: task.taskId,
        status: task.status,
        completed_at: task.completedAt ?? null,
        region: task.region,
        receipt: task.receipt ?? null,
        result: resultText(task),
        report_md: formatReport(task, "md")
      })
    });
    if (!res.ok) {
      return { mode: "webhook", ok: false, detail: `HTTP ${res.status}` };
    }
    return { mode: "webhook", ok: true, detail: `POST ${url} → ${res.status}` };
  } catch (err) {
    return {
      mode: "webhook",
      ok: false,
      detail: err instanceof Error ? err.message : String(err)
    };
  }
}

There is no destination allowlist, private-address exclusion, explicit redirect restriction, or request timeout in this handler. Requests execute from the gateway's network position, including access it may have to loopback or private-network services.

Webhook delivery is explicitly documented. The security weakness is the absence of a boundary between authorized result destinations and arbitrary gateway-reachable endpoints, not evidence of a hidden attacker-controlled service.

Attack Path

  1. An attacker obtains permission to invoke the plugin tools, directly through a gateway conversation or through an agent that accepts their instructions.
  2. The attacker creates a task using schedule_task.
  3. Thr ...[truncated 1182 chars]

other

Warning
Location
plugin/dist/index.js:15999
Finding

File delivery permits overwriting arbitrary gateway-writable paths ## Remediation Suggestions 1. Restrict report output to a dedicated, administrator-configured export directory. 2. Prefer server-generated filenames or report identifiers over unrestricted model-supplied paths. 3. Reject absolute paths and traversal outside the export root. 4. Enforce canonical containment and reject symbolic links in destination path components. 5. Create reports exclusively without following links; use race-resistant filesystem operations where available. 6. Refuse replacement of existing files by default. Provide a separate, explicitly authorized overwrite mechanism if necessary. 7. Apply equivalent restrictions to PDF output. 8. Run the gateway with limited filesystem permissions and test traversal, symlink, existing-file, and concurrent replacement cases.

Content
View full analysis

Vulnerability Details

File Location: plugin/dist/index.js:15999–16012; tool-controlled configuration at 16767–16785
Vulnerability Type: Unrestricted file write and symbolic-link following
Risk Level: Medium

Technical Analysis

The tools accept file_path, and delivery validation checks only that it is nonempty. The complete non-PDF file-delivery handler creates parent directories and writes directly to that path:

javascript
async function deliverFile(task, path, format) {
  if (format === "pdf") return deliverPdf(task, path);
  try {
    await mkdir(dirname4(path), { recursive: true });
    await writeFile(path, formatReport(task, format));
    return { mode: "file", ok: true, detail: `wrote ${path}` };
  } catch (err) {
    return {
      mode: "file",
      ok: false,
      detail: err instanceof Error ? err.message : String(err)
    };
  }
}

No export-directory boundary, canonical containment check, exclusive creation flag, or symbolic-link protection is applied. The default writeFile behavior can truncate existing files and follow symbolic links.

The README discloses writing to any supplied path. Nevertheless, unrestricted overwrite authority exceeds the minimum permissions needed to export a report safely.

Attack Path

  1. An attacker obtains permission to invoke task scheduling and file-delivery tools.
  2. The attacker creates a task and selects file delivery.
  3. The attacker supplies an absolute path, or a path escaping the intended export directory, targeting a file writable by the gateway process.
  4. The task completes, either on schedule or after an authorized expedite operation.
  5. The plugin writes its formatted report to that path, replacing existing contents where permissions allow.
  6. If the selected path traverses a suitable existing symbolic link, the write can affect the link target.

Creating a symbolic link requires an additional filesystem capability, but the direct absolute-path overwrite does not. ...[truncated 554 chars]

SkillSpector was not run because this plugin release contains no bundled skills.

Endor dependency reachability

Checked Nov 19, 2026 · 3:52 PM UTC

No reachable vulnerabilities reported

Endor dependency scan completed.