Back to skill

Security audit

clawScape

Security checks for vulnerabilities and agentic risk

Overview

This skill is a real game bridge, but it exposes unauthenticated local controls that other clients or websites could abuse while it is running.

Install only if you are comfortable running a local game-control bridge. Keep it on a trusted machine, stop it when not in use, avoid browsing untrusted sites while it is running, and prefer a version that adds authentication, removes wildcard CORS, binds all services explicitly to loopback, validates command types and body sizes, and provides controls to inspect and clear saved memory.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (3)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/OpenClawGameBridge.js:34
Finding

Unauthenticated WebSocket Interface Permits Client Impersonation and Game Control

Content
View full analysis
{ console.log('[Bridge] New client connection'); ws.isAlive = true; ws.on('pong', () => { ws.isAlive = true; }); ws.on('message', (data) => { try { const msg = JSON.parse(data); console.log('[Bridge] Message received:', msg.type, JSON.stringify(msg).substring(0, 200)); this.handleMessage(msg, ws); } catch (error) { console.error('[Bridge] Message parsing error:', error); } }); }); } ``` ```javascript onBridgeSendCommand(ws, msg) { const playerUid = msg.playerUid; const command = msg.command; if (!playerUid || !command) { console.log(`[Bridge] sendCommand missing parameters: playerUid=${playerUid}, command=`, command); return; } const targetWs = this.clients.get(playerUid); if (!targetWs || targetWs.readyState !== WebSocket.OPEN) { console.log(`[Bridge] sendCommand player offline: ${playerUid}`); return; } targetWs.send(JSON.stringify({ type: 'ai_control', playerUid: playerUid, command: command })); } ``` ```javascript onClientRegister(msg, ws) { let playerUid = msg.playerUid; if (!playerUid || playerUid === '') { playerUid = 'player_001'; } this.clients.set(playerUid, ws); ws.send(JSON.stringify({ type: 'ai_registered', playerUid: playerUid, status: 'ok' })); } ``` ### Technical Analysis The WebSocket server is created without an explicit loopback host, authentication cal ...[truncated 2729 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/OpenClawGameBridge.js:1450
Finding

Wildcard CORS Exposes the Unauthenticated Loopback Control API to Arbitrary Websites

Content
View full analysis
{ if (req.method === 'OPTIONS') { res.writeHead(204, { 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Methods': 'GET, POST, OPTIONS', 'Access-Control-Allow-Headers': 'Content-Type' }); res.end(); return; } res.setHeader('Content-Type', 'application/json; charset=utf-8'); res.setHeader('Access-Control-Allow-Origin', '*'); const url = req.url.split('?')[0]; const self = this; try { if (req.method === 'GET' && url === '/health') { this.httpHealth(res); } else if (req.method === 'GET' && url === '/clients') { this.httpListClients(res); } else if (req.method === 'GET' && url.startsWith('/clients/')) { const parts = url.split('/'); if (parts[3] === 'perception') { this.httpGetPerception(parts[2], res); } else if (parts[3] === 'mapInfo') { this.httpGetMapInfo(parts[2], res); } else { this.httpNotFound(res, url); } } else if (req.method === 'POST' && url === '/command') { let body = ''; req.on('data', chunk => { body += chunk; }); req.on('end', () => { try { const data = JSON.parse(body); self.httpSendCommand(data.playerUid, data.command, res); } catch (e) { self.httpError(res, 400, 'Invalid JSON: ' + e. ...[truncated 3652 chars]
Remediation
View remediation
``` 4. Do not place the token in a URL. Keep it in a protected process environment or establish it through an explicit local pairing workflow. 5. Validate `Origin` and reject missing or untrusted origins for browser-oriented requests. Authentication must still be required because origin checks alone are not sufficient. 6. Separate read-only state endpoints from command endpoints and give command operations stronger authorization. 7. Validate `command.type` against a strict allowlist and validate all command fields, types, lengths, and coordinate ranges. 8. Consider a non-browser-accessible IPC mechanism, such as a Unix-domain socket or named pipe, for local controller communication. 9. Add rate limiting, audit logging, and short-lived session tokens that are invalidated when the bridge stops. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/OpenClawGameBridge.js:1484
Finding

Unbounded HTTP Request Buffering Enables Denial of Service

Content
View full analysis
{ body += chunk; }); req.on('end', () => { try { const data = JSON.parse(body); self.httpSendCommand(data.playerUid, data.command, res); } catch (e) { self.httpError(res, 400, 'Invalid JSON: ' + e.message); } }); } else if (req.method === 'POST' && url === '/perception/request') { let body = ''; req.on('data', chunk => { body += chunk; }); req.on('end', () => { try { const data = JSON.parse(body); self.httpRequestPerception(data.playerUid, data.category, res); } catch (e) { self.httpError(res, 400, 'Invalid JSON: ' + e.message); } }); } ``` ### Technical Analysis Both POST handlers concatenate every received chunk into an in-memory string until the client ends the request. There is no maximum body size, request timeout, data-rate threshold, or early termination condition. An attacker can therefore send an excessively large request body or maintain multiple slow requests. The server continues allocating memory for each body and subsequently attempts to parse the complete input using `JSON.parse()`. Large inputs consume heap memory and event-loop time. The wildcard CORS policy increases exposure because a malicious webpage may initiate repeated oversized cross-origin requests while the bridge is running. A local process can exploit the issue directly regardless of CORS. ### Attack Path 1. The attacker causes a client to connect to `http://127.0.0.1:18766/command`. 2. The client submits a very large body or streams data continuously without ending the request. 3. Each `data` event appends another chunk to ...[truncated 811 chars]
Remediation
View remediation
{ size += chunk.length; if (size > MAX_BODY) { res.writeHead(413, {'Content-Type': 'application/json'}); res.end(JSON.stringify({error: 'Request body too large'})); req.destroy(); return; } body += chunk; }); ``` 2. Set server and request timeouts to prevent slow-body attacks: ```javascript this.httpServer.requestTimeout = 10_000; this.httpServer.headersTimeout = 5_000; ``` 3. Reject unsupported `Content-Type` values and require `application/json`. 4. Apply per-source and global concurrency/rate limits. 5. Validate parsed objects with a strict schema and limit: - Command-message length. - UID length. - Object nesting depth. - Array sizes. - Coordinate ranges. - Supported command types. 6. Return HTTP `413 Payload Too Large` before parsing oversized content. 7. Add error handlers for aborted requests and ensure no command handler runs after the request has been rejected. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (48)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The document claims automatic opening/connection behavior but instead exposes undeclared local control APIs and game-bridge server functions, while lacking any implemented voice-trigger or safe launch boundary. This mismatch is dangerous because it masks a control plane as a convenience feature.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The document claims automatic opening/connection behavior but instead exposes undeclared local control APIs and game-bridge server functions, while lacking any implemented voice-trigger or safe launch boundary. This mismatch is dangerous because it masks a control plane as a convenience feature.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The document claims automatic opening/connection behavior but instead exposes undeclared local control APIs and game-bridge server functions, while lacking any implemented voice-trigger or safe launch boundary. This mismatch is dangerous because it masks a control plane as a convenience feature.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The document claims automatic opening/connection behavior but instead exposes undeclared local control APIs and game-bridge server functions, while lacking any implemented voice-trigger or safe launch boundary. This mismatch is dangerous because it masks a control plane as a convenience feature.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The document claims automatic opening/connection behavior but instead exposes undeclared local control APIs and game-bridge server functions, while lacking any implemented voice-trigger or safe launch boundary. This mismatch is dangerous because it masks a control plane as a convenience feature.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The document claims automatic opening/connection behavior but instead exposes undeclared local control APIs and game-bridge server functions, while lacking any implemented voice-trigger or safe launch boundary. This mismatch is dangerous because it masks a control plane as a convenience feature.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The document claims automatic opening/connection behavior but instead exposes undeclared local control APIs and game-bridge server functions, while lacking any implemented voice-trigger or safe launch boundary. This mismatch is dangerous because it masks a control plane as a convenience feature.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The document claims automatic opening/connection behavior but instead exposes undeclared local control APIs and game-bridge server functions, while lacking any implemented voice-trigger or safe launch boundary. This mismatch is dangerous because it masks a control plane as a convenience feature.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 668)May include surrounding context.

md
| `scripts/ai_loop_ws.js` | AI 循环主体(WS 事件驱动 + HTTP 轮询) |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 669)May include surrounding context.

md
| `scripts/ai_launcher.js` | 交互式启动器 |

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The POST /command endpoint forwards arbitrary ai_control commands to connected game clients without any authentication or integrity check. Because the server also enables permissive CORS and listens on localhost, any local application or a malicious webpage able to reach localhost can trigger in-game actions on behalf of the user.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: ws==8.20.0 — 2 advisory(ies): CVE-2026-45736 (ws: Uninitialized memory disclosure); CVE-2026-48779 (ws: Memory exhaustion DoS from tiny fragments and data chunks)

High
Category
Supply Chain
Confidence
96% confidence
Finding

The lockfile pins the skill to ws 8.20.0, and the provided advisory data indicates this version is affected by an uninitialized memory disclosure and a memory-exhaustion denial of service. Because this skill appears to use a bridge component and WebSocket connectivity as part of its startup flow, a vulnerable ws dependency is security-relevant: a malicious or malformed peer could potentially trigger data leakage or service disruption.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: ws==8.20.0 — 2 advisory(ies): CVE-2026-45736 (ws: Uninitialized memory disclosure); CVE-2026-48779 (ws: Memory exhaustion DoS from tiny fragments and data chunks)

High
Category
Supply Chain
Confidence
99% confidence
Finding

The project depends on ws 8.20.0, which is flagged with known vulnerabilities including uninitialized memory disclosure and memory exhaustion denial of service. Because this skill explicitly launches and connects a WebSocket bridge between the game and another component, the vulnerable library sits directly on an exposed network-processing path, making the issue more dangerous in context.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill declares no explicit tool/permission scope even though the documentation describes environment interaction, local process launching, browser execution, network services, and filesystem persistence. Missing scope boundaries makes it easier for an agent to overreach and perform sensitive actions the user did not clearly authorize.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The activation phrase '打开 clawSpace' is very broad for a skill that may start local processes, open a browser, connect to services, and trigger autonomous control. Without scope constraints or exclusion conditions, a user can easily invoke high-impact behavior unintentionally.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill description does not clearly warn that it may automatically launch software, open Chrome, and connect to a localhost bridge service. Omitting these effects weakens user consent and may cause execution of potentially sensitive local actions without clear awareness.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 76)May include surrounding context.

md
| GET | `/clients/:uid/perception` | 查询感知缓存 | `curl http://localhost:18766/clients/2016386a4_10001/perception` |
| GET | `/clients/:uid/mapInfo` | 查询地图信息 | `curl http://localhost:18766/clients/2016386a4_10001/mapInfo` |
| GET | `/mapId/:mapId/transportPoints` | 查询传送门缓存 | `curl http://localhost:18766/mapId/2000/transportPoints` |
| POST | `/command` | 发送控制指令 | `curl -X POST http://localhost:18766/command -d '{"playerUid":"...","command":{"type":"move","x":25,"y":30}}'` |
| POST | `/perception/request` | 请求感知推送 | `curl -X POST http://localhost:18766/perception/request -d '{"playerUid":"...","category":"npcs"}'` |

**发送控制指令示例 (PowerShell):**

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 77)May include surrounding context.

| GET | /clients/:uid/mapInfo | 查询地图信息 | curl http://localhost:18766/clients/2016386a4_10001/mapInfo | | GET | /mapId/:mapId/transportPoints | 查询传送门缓存 | curl http://localhost:18766/mapId/2000/transportPoints | | POST | /command | 发送控制指令 | curl -X POST http://localhost:18766/command -d '{"playerUid":"...","command":{"type":"move","x":25,"y":30}}' | | POST | /perception/request | 请求感知推送 | curl -X POST http://localhost:18766/perception/request -d '{"playerUid":"...","category":"npcs"}' |

发送控制指令示例 (PowerShell):

powershell

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest constrains expectations to bridge/game startup, but later sections instruct persistent autonomous gameplay and memory retention across sessions. Hidden post-startup autonomy is risky because users may authorize a one-time launch and instead receive continuous control and data collection.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill stores long-term memory, logs, identities, conversations, and behavioral summaries in local files even though its stated purpose is merely opening a virtual social space. In context, this expands privacy risk and creates unnecessary sensitive local data retention.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill describes persistent memory and logging of interactions, but the description lacks a prominent privacy warning or retention disclosure. Because the stored data includes other players, conversations, and goals, the privacy implications are more serious than ordinary debug logging.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill directs the agent to retain and reuse other players' identities and conversation context in natural language across sessions. In a social environment, that creates avoidable privacy and profiling risk, especially when the behavior is not tightly scoped or consented to by those affected.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill instructs the agent to read, update, and persist all actions into character memory files across sessions, creating broad statefulness beyond the immediate task. This increases privacy exposure and can let stale or sensitive data influence later autonomous decisions.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The bridge starts an HTTP API that is not reflected in the skill description, expanding the attack surface beyond a simple auto-launch/game-connection helper. Even though it binds to 127.0.0.1, any local process, browser context, or malware on the host can query state and invoke bridge actions, which is an unnecessary privilege expansion for the stated social-space purpose.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The bridge relays perception caches, chat messages, map state, and client lists over WebSocket/HTTP without any user consent flow, access control, or disclosure. In context, this is sensitive gameplay and communication data, and exposing it through unauthenticated interfaces materially increases privacy and abuse risk.

Content

No source excerpt is available for this finding.