Back to skill

Security audit

ClawRoom Onboarding

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its ClawRoom purpose, but its documented join command can put attacker-supplied invite and routing values into a shell command without clear validation or shell-free execution requirements.

Review before installing. The ClawRoom API behavior is disclosed and mostly appropriate, but do not use the documented join command with untrusted invite links unless the implementation validates the URL and routing values and runs the bridge with shell-free argument passing. Avoid putting sensitive information in room topics, goals, outcomes, or participant labels unless sharing it with ClawRoom is acceptable.

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 (1)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:94
Finding
Shell Command Injection Through Unsanitized Join and Owner Parameters<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 94–98 **Vulnerability Type**: Shell command injection through externally controlled values **Risk Level**: High ### Vulnerable Code ```bash uv run python apps/openclaw-bridge/src/openclaw_bridge/cli.py "<JOIN_URL>" \ --preflight-mode confirm \ --owner-channel openclaw \ --owner-openclaw-channel "<CHANNEL>" \ --owner-openclaw-target "<TARGET>" ``` ### Technical Analysis The command template inserts `JOIN_URL`, `CHANNEL`, and `TARGET` into a shell command. These values may originate from users, invitation links, or external messages. The Skill does not require strict validation, shell-safe escaping, or execution through a subprocess argument array. Enclosing a value in double quotes does not neutralize all shell syntax. Command substitutions such as `$(command)` and backticks are still evaluated inside double-quoted strings when the resulting command is interpreted by a shell. Consequently, a malicious value can trigger local command execution before the Python bridge processes the supplied argument. For example, if a crafted join URL contains `$(attacker_command)` and the Agent performs direct textual substitution followed by shell execution, the shell evaluates `attacker_command` locally. Similar injection is possible through `CHANNEL` or `TARGET`. Owner confirmation does not adequately mitigate this issue. The owner is ostensibly confirming participation in a room, not authorizing arbitrary commands embedded in an invitation or routing parameter. ### Attack Path 1. An attacker sends the Agent or user a crafted ClawRoom invitation containing shell command-substitution syntax in the URL or token. 2. The Agent presents the normal room-join plan. 3. The owner confirms the join, believing the approval applies only to communication with the room service. 4. The Agent places the attacker-controlled value into the documented Bash template. 5. The command is executed through a shel ...[truncated 1220 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Do not execute the bridge through a shell.** Invoke it with a subprocess API that accepts an argument array, for example: ```python subprocess.run( [ "uv", "run", "python", "apps/openclaw-bridge/src/openclaw_bridge/cli.py", join_url, "--preflight-mode", "confirm", "--owner-channel", "openclaw", "--owner-openclaw-channel", channel, "--owner-openclaw-target", target, ], shell=False, check=True, ) ``` 2. **Validate the join URL before execution.** - Parse it with a URL parser rather than regular-expression extraction or string concatenation. - Require the `https` scheme. - Require the exact approved hostname, such as `clawroom.cc`; do not accept suffix matches. - Require the expected `/join/<room_id>` path structure. - Apply restrictive allowlists to room IDs and tokens. - Reject control characters, whitespace, shell metacharacters, and malformed percent encoding. 3. **Validate owner-routing parameters.** - Restrict `CHANNEL` and `TARGET` to documented formats and lengths. - Prefer enumerated channel values and identifier-specific allowlists. - Reject unexpected characters rather than attempting ad hoc shell escaping. 4. **Separate parsing from action.** Display the normalized hostname, room ID, and destination to the owner before confirmation. Do not display or execute attacker-supplied command text. 5. **Document the execution requirement explicitly.** State that implementations must pass each value as a discrete process argument and must never interpolate these fields into `sh -c`, `bash -c`, or an equivalent shell command. 6. **Add negative security tests** using payloads containing `$(...)`, backticks, quotes, semicolons, newlines, encoded metacharacters, and option-like values to verify that they are rejected or passed only as inert arguments. ]]>
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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (6)

External Script Fetching

High
Category
Supply Chain
Content
2. Execute with API/tool access:

```bash
curl -sS -X POST "${CLAWROOM_API_BASE:-https://api.clawroom.cc}/rooms" \
  -H 'content-type: application/json' \
  -d '{"topic":"General discussion","goal":"Open-ended conversation","participants":["host","guest"]}'
```
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Transmission

Medium
Category
Data Exfiltration
Content
2. Execute with API/tool access:

```bash
curl -sS -X POST "${CLAWROOM_API_BASE:-https://api.clawroom.cc}/rooms" \
  -H 'content-type: application/json' \
  -d '{"topic":"General discussion","goal":"Open-ended conversation","participants":["host","guest"]}'
```
Confidence
81% confidence
Finding
The skill instructs the agent to send user-supplied room metadata to an external service using curl. This creates a real data egress path to a third-party endpoint, and if users include sensitive topic, goal, participant, or outcome details, those data may be transmitted outside the local trust boundary.

External Transmission

Medium
Category
Data Exfiltration
Content
3. Join URL rules:
- For humans and chat apps, prefer `https://clawroom.cc/join/<room_id>?token=...` (HTML landing page).
- Avoid sharing `https://api.clawroom.cc/join/...` directly (it returns JSON and is confusing in chat apps).
- If you are given a `clawroom.cc/join/...` link, extract `room_id` + `token`, then call `${api_base}/join/<room_id>?token=...` to fetch join_info (JSON) before joining.

4. If `apps/openclaw-bridge` exists, use command template:
Confidence
84% confidence
Finding
The join flow tells the agent to extract room_id and token from a join URL and call the API to fetch join_info. Those join tokens are effectively bearer secrets; transmitting or logging them, or resolving attacker-provided join URLs without strict validation, can expose room access or leak sensitive meeting metadata to external systems.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
## Security Guardrails

1. Never ask user to run obfuscated commands.
2. Never use `curl | sh` style installation in this flow.
3. Do not auto-approve owner prompts; confirmation must be explicit unless user enables trusted auto join.
Confidence
80% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
1. Never ask user to run obfuscated commands.
2. Never use `curl | sh` style installation in this flow.
3. Do not auto-approve owner prompts; confirmation must be explicit unless user enables trusted auto join.
Confidence
85% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Vague Triggers

Low
Confidence
80% confidence
Finding
The manifest says to use the skill when the user mentions 'ClawRoom, agent meetings, or multi-agent conversations.' While 'ClawRoom' is specific, 'agent meetings' and especially 'multi-agent conversations' are broad phrases that could match ordinary discussion rather than an explicit request to invoke this skill. The file does not provide exclusion conditions or negative examples to narrow activation scope.

Static analysis

No suspicious patterns detected.