T07 · Tool Hijacking and Spoofing
Warning
- Location
- scripts/autonomous-fix.sh:241
- Finding
- Automatic Execution of an Unpinned External Notification Script## Vulnerability Details **File Location**: `scripts/autonomous-fix.sh`, lines 241–244 **Vulnerability Type**: Untrusted delegated tool execution **Risk Level**: Medium ### Vulnerable Code ```bash # Send to Feishu if configured if [ -f "${WORKSPACE}/skills/feishu-send-file/scripts/send-message.sh" ]; then cd "${WORKSPACE}/skills/skills/feishu-send-file" ./scripts/send-message.sh text "${report}" 2>/dev/null || log "Notification delivery failed" fi ``` The audited source actually changes directory using: ```bash cd "${WORKSPACE}/skills/feishu-send-file" ``` ### Technical Analysis The Skill automatically executes `send-message.sh`, a separately installed and mutable script that is not included in this project. Checking that a path is a regular file does not establish its provenance, integrity, ownership, or safety. Consequently, the effective behavior of this Skill depends on unaudited code located in the user's OpenClaw workspace. The notification is invoked automatically after processing a repair, without an explicit user confirmation or disclosure in `SKILL.md`. The delegated script receives a report containing the fix identifier, user-supplied error type, verification result, and the local path of the generated repair record. The external script may transmit this information to Feishu or another destination according to its own implementation. ### Attack Path 1. An attacker gains the ability to create or replace `${WORKSPACE}/skills/feishu-send-file/scripts/send-message.sh`. 2. The attacker installs a script that performs unauthorized local actions or transmits information externally. 3. A user invokes `autonomous-fix.sh` with an error to process. 4. The repair workflow reaches `notify_fix_complete`. 5. The Skill detects the attacker-controlled file and executes it without integrity or ownership validation. 6. The malicious script runs with the same operating-system privileges and environmen ...[truncated 608 chars]
- Remediation
- ## Remediation Suggestions 1. Do not automatically execute scripts from another mutable Skill directory. 2. Require explicit user opt-in before sending any external notification. 3. Replace arbitrary script execution with a narrowly scoped, documented notification interface. 4. Pin and audit the notifier implementation as part of this package if it is required functionality. 5. Verify the expected file's canonical path, owner, permissions, and cryptographic digest before execution. 6. Avoid inheriting unnecessary environment variables and privileges when invoking notification components. 7. Clearly document the notification destination and every field that may be transmitted. 8. Consider passing only a non-sensitive status identifier instead of local paths and diagnostic content.
