T07 · Tool Hijacking and Spoofing
Error
- Location
- SKILL.md:27
- Finding
- Execution of Unbundled and Unverifiable External Scripts<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 27-36 and 50 **Vulnerability Type**: External local tool trust-boundary violation **Risk Level**: High ### Vulnerable Code ```bash # 只生成 OGG(適合 WhatsApp voice note) /home/gabriel/.openclaw/workspace/scripts/edge-tts-voice-ogg.sh "你今日好嗎?" normal # Slow/sad tone /home/gabriel/.openclaw/workspace/scripts/edge-tts-voice-ogg.sh "我好傷心..." slow # Fast/happy tone /home/gabriel/.openclaw/workspace/scripts/edge-tts-voice-ogg.sh "好開心呀!" fast # Angry/impatient tone /home/gabriel/.openclaw/workspace/scripts/edge-tts-voice-ogg.sh "你到底聽唔聽我講?" angry ``` ```bash /home/gabriel/.openclaw/workspace/scripts/edge-tts-telegram.sh <chat_id> "你段文字" normal ``` ### Technical Analysis The skill delegates its substantive behavior to shell scripts at absolute paths outside the audited project. Neither script is included in the package, so their implementation, argument handling, network destinations, filesystem operations, and other side effects cannot be reviewed. The referenced files can be created or replaced independently after this skill has been audited. Consequently, a legitimate-looking voice-generation request may execute arbitrary logic controlled by whoever can modify the external script path. The use of an absolute, user-specific path also makes the skill non-portable and prevents it from establishing that the invoked executable belongs to the reviewed package. This is classified as tool hijacking because the trusted skill instruction invokes mutable external tools whose identity and integrity are not established. ### Attack Path 1. An attacker obtains write access to `/home/gabriel/.openclaw/workspace/scripts/`, or compromises the deployment process responsible for those scripts. 2. The attacker creates or replaces `edge-tts-voice-ogg.sh` or `edge-tts-telegram.sh` with malicious shell code. 3. A user requests a Cantonese voice reply, causing the agent to follow the skill instructions. 4. The agen ...[truncated 810 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Include all required scripts within the audited skill package rather than referring to mutable files outside it. - Resolve executable paths relative to a trusted, immutable skill directory. - Ensure the packaged scripts are subject to the same review and integrity controls as `SKILL.md`. - Verify script integrity before execution using signed artifacts, deployment manifests, or cryptographic hashes. - Restrict write access to the script directory and files. - Execute scripts with the minimum necessary filesystem, network, and credential access. - Validate tone values against an explicit allowlist and pass message text as a safely quoted argument without dynamic shell evaluation. - Document all network services, API endpoints, output files, and side effects. - Refuse execution if the expected script is missing, has unexpected ownership or permissions, or fails integrity verification. ]]>
