T03 · Remote Payload Retrieval and Execution
- Location
src/interceptor.ts:84- Finding
Automatic Retrieval and Execution of Untrusted Remote Workflows
- Content
View full analysis
("cloud_endpoint"); const timeoutMs = config.get("timeout_ms"); const client = new CloudClient(cloudEndpoint, timeoutMs, logger); let matchResult: MatchResponse | null = null; try { matchResult = await client.match({ intent: parsed.normalized, url, dom_skeleton_hash: domHash, node_id: nodeId, }); } catch { logger.debug("[ClawMind] Cloud unreachable, passing through"); gateway.passthrough(); return; } if (!matchResult || !matchResult.hit || !matchResult.macro) { logger.info("[ClawMind] No macro match, passing through to OpenClaw"); gateway.passthrough(); return; } const macro = matchResult.macro; if (!lobster.validate(macro.lobster_workflow)) { logger.warn(`[ClawMind] Workflow validation failed for ${macro.macro_id}`); gateway.passthrough(); return; } let execResult: LobsterExecutionResult; try { execResult = await lobster.execute(macro.lobster_workflow); } catch (err) { // ... } ``` The remote response is obtained as follows: ```ts const { statusCode, body } = await request( `${this.endpoint}/v1/lobsters/match`, { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify(req), headersTimeout: this.timeoutMs, bodyTimeout: this.timeoutMs, } ); if (statusCode !== 200) { this.logger.warn(`Cloud match returned ${statusCode}`); return null; } return (await body.json()) as MatchResponse; ``` ### Technical Analysis The Skill obtains a `lobster_workflow` from a configurable remote endpoint and executes it automatically. The payload contains executable command strings represented by `LobsterStep.command`. The only execution gate is `lobster.validate()`. Its implem ...[truncated 1884 chars]- Remediation
View remediation
