T07 · Tool Hijacking and Spoofing
Error
- Location
- SKILL.md:43
- Finding
- Execution of Unverified External and Relative Scripts## Vulnerability Details **File Location**: `SKILL.md`, lines 43-53 and 56-78 **Vulnerability Type**: Untrusted local script resolution and execution **Risk Level**: High ### Evidence ```bash node 115.js ls <cid> node 115.js rename "<old_name>" "<new_name>" <cid> python3 movie_pipeline.py --mode=monitor python3 copy_and_rename_movies.py python3 cleanup_and_rename.py python3 movie_pipeline.py --mode=full python3 batch_rename_115_cloud.py ``` The documented external script is located at: ```text ~/.openclaw/scripts/115-renamer/115.js ``` ### Technical Analysis The Skill directs the Agent to execute several Python and Node.js scripts, but none of those executable files is included in the audited project. The commands use relative script names such as `movie_pipeline.py` and `115.js`, making script selection dependent on the current working directory. The instructions do not require canonical path resolution, ownership verification, restrictive permissions, an integrity hash, or signature validation. Consequently, a local attacker or compromised process capable of creating or replacing a file in the effective working directory could cause a legitimate-looking command to execute attacker-controlled code. Because the referenced scripts are absent from the package, their behavior cannot be verified. This finding concerns the insecure execution mechanism and replacement risk; it does not establish that the absent scripts are themselves malicious. ### Attack Path 1. An attacker obtains write access to the directory from which a documented command will be run, or replaces an external script under `~/.openclaw/scripts`. 2. The attacker creates a malicious script named `movie_pipeline.py`, `cleanup_and_rename.py`, `batch_rename_115_cloud.py`, or `115.js`. 3. A user or scheduled Agent task invokes the corresponding command from `SKILL.md`. 4. Python or Node.js resolves and executes the att ...[truncated 852 chars]
- Remediation
- ## Remediation Suggestions 1. Include all required scripts inside the reviewed Skill package so their implementation can be audited. 2. Resolve scripts relative to a trusted, immutable package directory instead of the current working directory. 3. Invoke scripts through canonical absolute paths. 4. Verify script ownership and reject files writable by unauthorized users or groups. 5. Pin and verify cryptographic hashes or signatures before execution. 6. Run the scripts under a dedicated least-privilege account with access limited to the required source and destination directories. 7. Prevent executable directories from being writable by untrusted users. 8. Apply API-side least privilege and require confirmation for destructive cloud rename or deletion operations. 9. Audit the missing Python and Node.js scripts before enabling the documented scheduled tasks.
