T09 · Insecure Skill Coding Practices
- Location
start.sh:34- Finding
Execution of an Untrusted Server Script from a Shared Temporary Directory
- Content
View full analysis
/tmp/security_panel.log 2>&1 & SERVER_PID=$! echo $SERVER_PID > /tmp/security_panel.pid ``` ### Technical Analysis The launcher executes `/tmp/security_panel_server.py`, but that file is neither included in the audited project nor generated by `scripts/security_check.py`. The implementation therefore relies on an unauthenticated file at a predictable path in a globally writable temporary directory. A local attacker can create this file before the Skill starts. When the launcher subsequently invokes Python, the attacker's code executes with the privileges of the account running the Skill. If the Skill is run as an administrative account, the payload receives those elevated privileges. This also means the actual HTTP server and `/api/fix` implementation are outside the reviewed package, preventing the advertised panel and automatic remediation behavior from being independently verified. ### Attack Path 1. A local attacker creates `/tmp/security_panel_server.py`. 2. The attacker places arbitrary Python code in that file. 3. A victim invokes `start.sh`. 4. The launcher runs the attacker-controlled file with Python. 5. The payload inherits the victim's user privileges and can access the victim's OpenClaw files, workspace, reports, and credentials. 6. Because the process is launched through `nohup`, the malicious process may continue running after the launching shell exits, although this does not establish reboot persistence. ### Impact Assessment Successful exploitation provides arbitrary code execution as the Skill user. The attacker may read or modify OpenClaw configuration, workspace data, generated security reports, and any other resources ...[truncated 324 chars]- Remediation
View remediation
