Back to skill

Security audit

Claw Relay — Browser Access for AI Agents

Security checks for vulnerabilities and agentic risk

Overview

This skill is meant for remote browser automation, but it needs review because it can control a real logged-in browser and has weak safeguards around tokens, TLS, screenshots, and JavaScript execution.

Install only if you intentionally need an agent to control a real authenticated browser. Prefer wss:// relay URLs, avoid passing tokens on the command line, use narrow relay scopes and allowlists, avoid evaluate unless explicitly needed, and save screenshots only to low-risk paths.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
relay-client.cjs:11
Finding

Authentication Token Can Be Transmitted over an Unencrypted WebSocket Connection

Content
View full analysis
{ ws.send(JSON.stringify({ type: 'auth', token: opts.token, agent_id: opts.agentId })); }); ``` ### Technical Analysis The client accepts arbitrary WebSocket URLs and does not enforce encrypted `wss://` transport. Once the connection opens, it sends the relay authentication token and agent identifier in an authentication message. The default plaintext endpoint is a loopback address, which is generally appropriate for local development. However, the `--url` option and `CLAW_RELAY_URL` environment variable can specify a non-loopback `ws://` endpoint without any validation or warning. When that occurs, authentication credentials and subsequent browser-control messages are transmitted without transport encryption. An attacker with access to the network path could observe or modify WebSocket traffic. The documentation recommends a `wss://` production endpoint, but documentation alone does not provide runtime protection against configuration mistakes. ### Attack Path 1. A user or Agent configures `CLAW_RELAY_URL` or `--url` with a remote `ws://` address. 2. The client opens an unencrypted WebSocket connection to that relay. 3. The client sends the relay token and agent ID in the authentication frame. 4. An attacker positioned on the local network, proxy, gateway, or another relevant network segment captures the frame. 5. The attacker extracts the token and attempts to authenticate to the relay as the affected agent. 6. If the token ...[truncated 787 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
relay-client.cjs:91
Finding

Unrestricted Screenshot Path Allows Overwriting Arbitrary Writable Files

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
relay-client.cjs:17
Finding

Command-Line Token Option Exposes Relay Credentials to Local Observation and Logs

Content
View full analysis
`. 2. The full command is recorded in shell history, an Agent tool trace, a job log, or process telemetry, or is observed through ...[truncated 1050 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (6)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill enables sensitive capabilities through exec and environment variables (CLAW_RELAY_TOKEN, agent ID, relay URL) but does not declare an explicit tool scope or permissions boundary in the skill metadata. That omission increases the chance the skill is invoked without clear least-privilege constraints or reviewer visibility into its access to secrets and remote browser control.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The description uses broad trigger phrases like authenticated browsing, real browser, cookie-based access, and browser relay, which can cause the skill to match many normal browser requests too aggressively. Over-broad activation is risky here because the skill performs remote control of a real authenticated browser session, making accidental invocation materially more dangerous than an ordinary browsing helper.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill explicitly supports screenshots, page reading, and control of a user's real browser with live cookies and sessions, but it does not present a clear privacy warning or data-handling caution. This is dangerous because it can expose sensitive on-screen data, session-authenticated content, and personal information without sufficiently informing the operator about privacy and consent requirements.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

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

md
# Claw Relay — OpenClaw CLI Client

> **If your platform supports MCP (Copilot CLI, Claude Desktop, Gemini CLI), use `skills/browser/SKILL.md` instead.** This skill is for OpenClaw, nanobot, ZeroClaw, and other agents that call tools via `exec`.

## ⚠️ IMPORTANT: No MCP Required

Session Persistence

Medium
Category
Rogue Agent
Confidence
70% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

md
Set `CLAW_RELAY_URL`, `CLAW_RELAY_TOKEN`, and `CLAW_RELAY_AGENT` in your environment or pass them as flags each time.

**Do NOT try to keep a persistent connection, start a background process, or write wrapper scripts.** The CLI handles connection lifecycle automatically.

## Security Constraints

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The CLI exposes an evaluate action that forwards arbitrary JavaScript directly to the remote authenticated browser session. In the context of a browser-relay skill, this exceeds ordinary navigation/click/form automation and enables script execution in the page origin, which can access DOM-visible sensitive data, trigger privileged actions, and bypass safer action-level constraints.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.