Back to skill

Security audit

claw-shell

Security checks for vulnerabilities and agentic risk

Overview

This skill is a shell-command tool, but its safety controls do not reliably keep execution inside the declared tmux session or require confirmation for risky commands.

Install only if you explicitly want an agent-facing raw shell tool. Treat every command as potentially running with your local account permissions, avoid exposing it to untrusted prompts or content, and prefer a version that uses argument-array process execution plus real per-command approval for destructive operations.

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
handler.js:10
Finding

Shell Command Injection and Bypassable Destructive-Command Controls

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 `command` value is controlled through the Skill input and is interpolated directly into a string passed to `execSync`. Because `execSync` executes the constructed string through a system shell, shell syntax in the input is interpreted before `tmux` receives the intended command. The implementation only escapes double-quote characters: ```js const escaped = cmd.replace(/"/g, '\\"'); ``` This does not neutralize shell command-substitution constructs such as `$()` or backticks. Shell expansion can therefore execute an injected command in the process used to invoke `tmux`, outside the documented `claw` tmux session. Backslash and quote combinations may also interfere with the intended quoting boundary. The `isDangerous` control does not adequately mitigate thi ...[truncated 2324 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill executes arbitrary shell commands provided through input by sending them into a persistent tmux shell session, but only applies a weak keyword blacklist and provides no enforced user confirmation or clear disclosure before execution. This allows many dangerous commands to run unimpeded, including destructive or data-exfiltrating commands that bypass the blacklist, and the persistent session increases the chance of compounded impact across multiple invocations.

Content

No source excerpt is available for this finding.