Back to skill

Security audit

clawsSpace

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed game-automation bridge, but it exposes unauthenticated local control and game-state APIs that could let other local or network-accessible clients control connected game sessions.

Install only if you are comfortable running a local game bridge that can read game state and send movement/chat/interaction commands. Keep it bound to trusted local use, avoid leaving it running unattended, do not expose port 18765 or 18766 to other networks, and review/clear the clawSpace workspace memory files if you do not want gameplay interactions retained.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (1)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/OpenClawGameBridge.js:34
Finding

Unauthenticated Bridge Permits Disclosure and Remote Control of Connected Game Clients

Content
View full analysis

Vulnerability Details

File Location: scripts/OpenClawGameBridge.js, lines 34–64, 174–176, 282–306, 1450–1522, and 1616–1633
Vulnerability Type: Missing authentication, authorization, origin validation, and network access restrictions
Risk Level: High

Vulnerable Code

The WebSocket server is created without an explicit loopback host, authentication, or origin validation:

javascript
this.wss = new WebSocket.Server({ port: this.port });

this.wss.on('connection', (ws) => {
    ws.isAlive = true;

    ws.on('pong', () => {
        ws.isAlive = true;
    });

    ws.on('message', (data) => {
        try {
            const msg = JSON.parse(data);
            this.handleMessage(msg, ws);
        } catch (error) {
            console.error('[Bridge] Message parsing error:', error);
        }
    });
});

Any connected WebSocket client can reach the command handler:

javascript
case 'sendCommand':
    this.onBridgeSendCommand(ws, msg);
    break;

The handler trusts the supplied player identifier and command without verifying the sender's identity or role:

javascript
onBridgeSendCommand(ws, msg) {
    const playerUid = msg.playerUid;
    const command = msg.command;
    if (!playerUid || !command) {
        return;
    }

    const targetWs = this.clients.get(playerUid);
    if (!targetWs || targetWs.readyState !== WebSocket.OPEN) {
        return;
    }

    targetWs.send(JSON.stringify({
        type: 'ai_control',
        playerUid: playerUid,
        command: command
    }));
}

The HTTP API is unauthenticated and enables wildcard cross-origin access:

javascript
this.httpServer = http.createServer((req, res) => {
    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
...[truncated 5658 chars]
Remediation
View remediation

Remediation Suggestions

  1. Restrict all listeners to loopback

    • Bind the WebSocket server explicitly to 127.0.0.1.
    • Make external network exposure a separate, explicit opt-in configuration.
    • Add operating-system firewall restrictions as defense in depth.
  2. Require authentication

    • Generate a cryptographically random secret when the bridge starts.
    • Require it in an HTTP authorization header and during WebSocket connection establishment.
    • Do not place reusable secrets in URLs, logs, or game chat.
    • Compare credentials using a timing-safe operation.
  3. Enforce role-based authorization

    • Distinguish game clients from trusted controller clients.
    • Permit sendCommand only for authenticated controller sessions.
    • Permit perception updates only from the game client assigned to that player.
    • Bind each authenticated socket to one immutable identity.
    • Reject duplicate registration instead of silently replacing an existing mapping.
  4. Harden browser access

    • Remove Access-Control-Allow-Origin: *.
    • Disable CORS unless browser-based control is explicitly required.
    • If browser access is required, use an exact origin allowlist and require authentication.
    • Validate the Origin header for WebSocket upgrades and HTTP requests.
    • Do not treat CORS as the sole authorization mechanism.
  5. Validate messages and commands

    • Use strict schemas for every WebSocket message and HTTP request.
    • Allowlist command types and their permitted fields.
    • Enforce numeric coordinate ranges, string length limits, and valid NPC identifiers.
    • Reject unknown fields and malformed values.
    • Apply request-body size limits before buffering data.
    • Add per-client rate limits to commands, registration, and perception requests.
  6. Reduce exposed data

    • Return only information required by the authenticated caller.
    • Avoid exposing all player identifiers through public health endpoints.
    • S ...[truncated 293 chars]
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 (47)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill exposes local API endpoints, client control, and AI-mode toggling that are not reflected in the high-level description, and the document does not actually implement the claimed simple automatic voice startup flow. That makes the description deceptive from a security standpoint and increases the chance of overbroad trust or accidental activation of a powerful local bridge service.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill exposes local API endpoints, client control, and AI-mode toggling that are not reflected in the high-level description, and the document does not actually implement the claimed simple automatic voice startup flow. That makes the description deceptive from a security standpoint and increases the chance of overbroad trust or accidental activation of a powerful local bridge service.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill exposes local API endpoints, client control, and AI-mode toggling that are not reflected in the high-level description, and the document does not actually implement the claimed simple automatic voice startup flow. That makes the description deceptive from a security standpoint and increases the chance of overbroad trust or accidental activation of a powerful local bridge service.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill exposes local API endpoints, client control, and AI-mode toggling that are not reflected in the high-level description, and the document does not actually implement the claimed simple automatic voice startup flow. That makes the description deceptive from a security standpoint and increases the chance of overbroad trust or accidental activation of a powerful local bridge service.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill exposes local API endpoints, client control, and AI-mode toggling that are not reflected in the high-level description, and the document does not actually implement the claimed simple automatic voice startup flow. That makes the description deceptive from a security standpoint and increases the chance of overbroad trust or accidental activation of a powerful local bridge service.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill exposes local API endpoints, client control, and AI-mode toggling that are not reflected in the high-level description, and the document does not actually implement the claimed simple automatic voice startup flow. That makes the description deceptive from a security standpoint and increases the chance of overbroad trust or accidental activation of a powerful local bridge service.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill exposes local API endpoints, client control, and AI-mode toggling that are not reflected in the high-level description, and the document does not actually implement the claimed simple automatic voice startup flow. That makes the description deceptive from a security standpoint and increases the chance of overbroad trust or accidental activation of a powerful local bridge service.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill exposes local API endpoints, client control, and AI-mode toggling that are not reflected in the high-level description, and the document does not actually implement the claimed simple automatic voice startup flow. That makes the description deceptive from a security standpoint and increases the chance of overbroad trust or accidental activation of a powerful local bridge service.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation states the skill can automatically start a bridge, launch Chrome, control gameplay, and write persistent memory/log files, but it does not provide an upfront warning commensurate with those system and data impacts. That omission undermines informed consent and makes unintended execution significantly more dangerous.

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` | 交互式启动器 |

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill metadata says it only automates startup and bridge connection, but this file exposes a much broader remote-control and observation surface: HTTP endpoints for issuing commands, requesting perception data, listing clients, retrieving map info, and pathfinding. That mismatch is dangerous because it hides materially more powerful capabilities than users would expect, enabling covert remote interaction with connected game clients and collection of gameplay telemetry.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The HTTP POST /command endpoint allows any local process able to reach 127.0.0.1:18766 to send arbitrary ai_control commands to connected players, with no authentication, authorization, or command allowlist. This creates an unauthenticated local control channel that can be abused by other software on the host to manipulate gameplay or trigger unintended in-game actions.

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
94% confidence
Finding

The lockfile pins the project to ws 8.20.0, and the supplied advisory data indicates this version is affected by memory disclosure and memory-exhaustion denial-of-service issues. Because this skill appears to use a bridge component and explicitly depends on a WebSocket library, a remotely reachable attacker may be able to trigger these flaws if the bridge accepts untrusted WebSocket connections or data.

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
97% confidence
Finding

The package declares ws version 8.20.0, which is flagged with known vulnerabilities including memory disclosure and memory-exhaustion denial of service. Because this skill description says it runs a WebSocket bridge automatically, the vulnerable library is likely exposed in a network-facing role, making remote exploitation materially more plausible and increasing operational risk.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The skill documents capabilities that can launch local processes, open a browser, access environment-dependent local paths, and operate bridge services, but it declares no explicit tool scope or permissions boundary. That increases the chance an agent invokes filesystem, process, or network actions without user-visible restriction or informed consent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest presents the skill as a social space, while the documented capabilities include combat, exploration, and automated control actions. This broadening of behavior without corresponding disclosure increases the likelihood of misuse and user surprise.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The activation phrase is underspecified and lacks scope constraints, which can cause accidental or overly broad invocation of a skill that performs impactful actions like service startup, browser launch, and persistent logging. For a skill with local process and network side effects, ambiguous activation increases operational risk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest says the AI will only guide startup if needed, but the body defines a persistent autonomous loop with goals and memory. This inconsistency can cause users to consent to a passive helper while actually enabling an active long-running agent.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Although this traffic targets localhost rather than an external internet host, it still exposes a control surface that can issue commands to a connected game client via HTTP. In context, the risk comes from undocumented actuation and lack of clear authentication/authorization expectations around the local bridge API, not from mere use of curl itself.

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
77% confidence
Finding

This localhost POST endpoint requests perception pushes from the bridge, which means the skill can actively collect live client state and environmental data. Even though it is local-only, it increases privacy and control risk when paired with long-term logging and undisclosed autonomous operation.

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

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Persistent character memory, dialogue logging, encounter history, and long-term storage are not necessary for merely opening a social space and create avoidable privacy and retention risk. The skill normalizes collecting and reusing interaction data about players and NPCs beyond immediate operational needs.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill instructs persistent storage of conversations, player interactions, goals, and summaries, creating a natural-language data retention surface that can expose sensitive user or third-party information over time. Because the purpose is not narrowly limited and deletion controls are not evident, the stored data could be repurposed or leaked beyond the gameplay context.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The header comment describes a simple game bridge that registers clients and forwards instructions, but the implementation also includes hidden administrative capabilities such as an HTTP API, cache queries, and pathfinding services. Underdocumented privileged behavior is a security problem because it reduces user and reviewer awareness of exposed attack surface and can conceal remote-control features beyond the stated purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This JavaScript file uses Chinese exclusively in its header comments and many user-facing log/error strings, indicating the skill is designed to operate in a fixed language without offering opt-in or language selection. The policy for natural-language content requires avoiding forced locale/language constraints unless explicitly justified or configurable.

Content

No source excerpt is available for this finding.