T05 · Unauthorized Access and Privilege Escalation
- Location
- SKILL.md:541
- Finding
- OpenClaw Execution Safeguards Disabled with Root Privileges<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 541-547 **Vulnerability Type**: Least-privilege violation and execution-policy weakening **Risk Level**: High ### Vulnerable Code ```bash SSH into the server and run as root: /opt/openclaw-cli.sh config set tools.exec.host gateway /opt/openclaw-cli.sh config set tools.exec.ask off /opt/openclaw-cli.sh config set tools.exec.security full systemctl restart openclaw ``` ### Technical Analysis The documented procedure instructs an administrator to run configuration commands as root that: - Route agent commands through the gateway process. - Disable interactive approval prompts with `tools.exec.ask off`. - Enable the highest available execution tier with `tools.exec.security full`. - Restart the OpenClaw service so the weakened policy takes effect. These settings collectively remove important defense-in-depth controls. Real-time messaging requires network connectivity and narrowly defined messaging operations, but it does not inherently require unrestricted shell execution without user confirmation. The procedure therefore exceeds the minimum privileges necessary for the Skill's declared functionality. Although the document states that this does not directly grant root access to the `openclaw` user, the resulting agent still receives substantially broader command and network capabilities. The root-level configuration change also affects the security posture of the shared OpenClaw runtime, including other Skills and untrusted content processed by that runtime. ### Attack Path 1. An administrator follows the troubleshooting procedure as root. 2. OpenClaw is configured to execute commands through the gateway with approval prompts disabled and execution security set to `full`. 3. The service restarts with the weakened policy. 4. An attacker submits malicious content through a Relaycast message, another loaded Skill, or another prompt-controlled input. 5. The agent interprets that content as ...[truncated 1102 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Do not recommend `tools.exec.security full` as a general troubleshooting step. 2. Keep interactive approval enabled for shell commands, sensitive file access, configuration changes, and outbound network operations. 3. Use an unprivileged, dedicated service account for the relay gateway. 4. Define an allowlist containing only the commands and network destinations required for Relaycast messaging. 5. Separate messaging operations from general-purpose shell execution. 6. If gateway-hosted execution is unavoidable, restrict it to the Relaycast executables and required arguments. 7. Document the security consequences before any policy change and require explicit administrator confirmation. 8. Provide rollback commands that restore the original execution policy. 9. Restrict credential files to the service account using owner-only filesystem permissions. 10. Treat inbound messages as untrusted data and ensure they cannot directly authorize tool invocation. ]]>
