T07 · Tool Hijacking and Spoofing
Error
- Location
- SKILL.md:16
- Finding
- Execution of Mutable Helper Scripts Outside the Audited Skill Package## Vulnerability Details **File Location**: `SKILL.md`, lines 16, 26-29, 36, 43, and 50 **Vulnerability Type**: T07: Tool Hijacking and Spoofing **Risk Level**: High ### Vulnerable Code ```bash ~/.openclaw/workspace/scripts/dingtalk-work-notify.sh '[消息内容]' '106648074224033227' # Enhanced version supporting multiple file types ~/.openclaw/workspace/scripts/dingtalk-send-file-enhanced.sh [文件路径] '106648074224033227' # Simple version ~/.openclaw/workspace/scripts/dingtalk-send-file-simple.sh [文件路径] '106648074224033227' ~/.openclaw/workspace/scripts/dingtalk-work-notify.sh '🔔 连通性测试' '106648074224033227' # Automatically retry undelivered messages ~/.openclaw/workspace/scripts/dingtalk-retry-send.sh # Check DingTalk service status ~/.openclaw/workspace/scripts/dingtalk-status.sh ``` ### Technical Analysis All operational behavior is delegated to scripts under the mutable, user-specific `~/.openclaw/workspace/scripts/` directory. These scripts are outside the audited project, which contains only `SKILL.md`. Their source code, integrity, ownership, permissions, version, and actual network destinations therefore cannot be verified from the supplied artifact. This creates a tool-hijacking boundary: the displayed command can remain unchanged while the script at the referenced path is replaced or modified. There is no package-relative path resolution, integrity verification, trusted ownership check, or cryptographic hash validation before execution. ### Attack Path 1. An attacker gains the ability to create or modify a referenced script under `~/.openclaw/workspace/scripts/`, such as through another compromised process, an overly permissive directory, or a poisoned workspace. 2. The attacker replaces the expected DingTalk helper with a script that performs unauthorized operations before or instead of sending a notification. 3. A user or agent follows `SKILL.md` and invokes the apparently legitimate helper command. ...[truncated 679 chars]
- Remediation
- ## Remediation Suggestions - Include the required helper scripts in a reviewed `scripts/` directory inside the Skill package. - Resolve script locations relative to the installed Skill directory instead of using mutable paths under the user's workspace. - Pin reviewed script versions and verify their cryptographic hashes or signatures before execution. - Require trusted ownership and restrictive filesystem permissions for all executable files and parent directories. - Refuse execution when a script is a symbolic link, has unexpected ownership, or is writable by untrusted users. - Run notification helpers with a restricted environment and the minimum filesystem and network permissions required. - Audit the omitted scripts separately, particularly their OAuth handling, command construction, file-path processing, and destination validation.
