T05 · Unauthorized Access and Privilege Escalation
- Location
run-claude.sh:26- Finding
<![CDATA[Claude Code Executes with Permission Checks Disabled]]>
- Content
View full analysis
&1) ``` The same unsafe execution mode is explicitly prescribed in `SKILL.md:54-57`: ```bash OUTPUT=$(cd /workdir && env -u CLAUDECODE claude --permission-mode bypassPermissions --print "task" 2>&1) OUTPUT=$(cd /workdir && env -u CLAUDECODE claude --permission-mode bypassPermissions --print --continue "task" 2>&1) ``` ### Technical Analysis The `--permission-mode bypassPermissions` option disables Claude Code's normal approval boundary for tool use. As a result, the delegated agent can execute shell commands and perform filesystem operations without requesting confirmation. The prompt is accepted from the Skill invocation, and the working directory can be selected by the caller. No sandbox, filesystem allowlist, command allowlist, or network restriction is applied by the wrapper. Consequently, Claude Code receives all permissions available to the operating-system account running OpenClaw, rather than only the permissions required for a particular project task. This does not independently grant root privileges, but it breaks least-privilege boundaries within the host user's accessible environment. ### Attack Path 1. An attacker supplies malicious or misleading content through a chat message or another prompt source consumed by the Skill. 2. OpenClaw delegates that content to `run-claude.sh` as `PROMPT`. 3. The wrapper starts Claude Code with `--permission-mode bypassPermissions`. 4. Claude Code processes the content and can invoke filesystem, shell, and other enabled tools without an approval prompt. 5. Commands run with the privileges of the OpenClaw host account and can access any resource available to that account. ### Impact Assessment Succe ...[truncated 627 chars]- Remediation
View remediation
