Back to skill

Security audit

Claw Shell 1.0.0

Security checks for vulnerabilities and agentic risk

Overview

This skill openly provides shell access through tmux, but its safety boundary is weak and can let commands run in broader or less visible ways than users would expect.

Install only if you intentionally want a broad shell-control skill and can run it inside a tightly sandboxed environment. Do not treat its dangerous-command warning as a reliable safety control, and avoid using it where the runtime account can access sensitive files, credentials, long-lived sessions, or important system state.

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

T09 · Insecure Skill Coding Practices

Error
Location
handler.js:10
Finding

Shell Injection Allows Command Execution Outside the Intended tmux Session

Content
View full analysis
/tmp/claw-shell-proof) ``` 2. `isDangerous()` does not reject the input because it contains none of the denylisted strings. 3. `sendCommand()` interpolates the input into the shell command: ```text tmux send-keys -t claw "echo $(id > /tmp/claw-shell-proof)" C-m ``` 4. The shell launched by `execSync()` evaluates `$(id > /tmp/claw-shell-proof)` before invoking `tmux`. 5. The injected `id` command therefore runs outside tmux with the identity and permissions of the Skill process. 6. Only the resulting substituted text is passed to the tmux pane, which can make the out-of-session execution less apparent in captured output. ### Impact Assessment An attacker can execute arbitrary shell commands in the host context of the Skill handler rather than only inside the designated tmux ses ...[truncated 495 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
handler.js:24
Finding

Bypassable Denylist Fails to Enforce Destructive-Command Approval

Content
View full analysis
lower.includes(k)); } // MAIN ENTRYPOINT // OpenClaw will call this function when using the skill tool async function claw_shell_run(input) { const { command } = input; if (!command || typeof command !== "string") { return { error: "command is required" }; } if (isDangerous(command)) { return { error: "dangerous_command", message: `Command looks dangerous. Ask the user for explicit approval before running: ${command}` }; } ``` ### Technical Analysis The safety control relies on matching a short set of literal substrings. This does not determine the semantic effect of an arbitrary shell command. The same destructive operation can be performed using: - Utilities not included in the denylist. - Language interpreters such as Python, Perl, or Node.js. - Shell functions, aliases, variables, or expansion. - Alternative whitespace and command construction. - Indirect scripts or binaries. For example, a file can be removed with `unlink`, and directory trees can be deleted through an interpreter without including the literal substring ` rm `. Such commands pass `isDangerous()` unchanged. The documentation also states that dangerous commands should require explicit user approval, but the handler accepts no approval field or trusted authorization state. A matching command is always rejected, while a semantically equivalent non-matching command is executed without approval. Therefore, neither side of the documented confirmation workflow is securely implemented. ### Attack Path 1. An attacker chooses a destructive operation that does n ...[truncated 1273 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill accepts an arbitrary string from input.command and sends it into a persistent tmux shell session, effectively providing broad shell execution capability. With no constrained command set, no authentication/authorization checks, and no clear justified purpose in the file, this can be abused to run destructive commands, access local data, install persistence, or pivot further in the environment.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code claims that only 'dangerous' commands need explicit approval, but its check is just a small substring blacklist that is trivial to bypass and misses many harmful operations. An attacker can execute arbitrary commands such as data exfiltration, file modification, process control, network access, or obfuscated destructive commands without triggering the warning, creating a misleading and unsafe trust boundary.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill executes the provided command and manipulates a tmux session without any built-in user-facing disclosure or confirmation at the point of execution. In an agent setting, this reduces transparency and can cause users or higher-level components to underestimate that commands are being run on the host, increasing the chance of unsafe or unintended execution.

Content

No source excerpt is available for this finding.