T09 · Insecure Skill Coding Practices
- Location
SKILL.md:23- Finding
Unvalidated Skill Identifier Interpolated into Shell Commands
- Content
View full analysis
``` Additional affected command patterns include: ```bash clawhub update ``` ```text clawhub install ``` ### Technical Analysis The documented workflows instruct an agent to substitute a user-supplied skill identifier directly into shell commands. The instructions do not require validation, shell escaping, or argument-safe process execution. If an implementation performs textual substitution and invokes the resulting string through a shell, metacharacters within the supplied identifier—such as command separators, command substitutions, redirections, or pipelines—may be interpreted as shell syntax rather than as part of a skill name. The WhatsApp workflow increases the exposed attack surface because the command can originate from a remote message. Exploitation remains dependent on the surrounding agent executing the constructed command through a shell without applying independent validation. ### Attack Path 1. An attacker submits an installation or update request containing a crafted skill identifier with shell metacharacters. 2. The agent follows the documented workflow and replaces `` with the attacker-controlled value. 3. The resulting command is passed to a shell. 4. The shell interprets the injected syntax and executes additional attacker-selected commands. 5. Those commands run with the operating-system privileges and environment access of the agent process. ### Impact Assessment Successful exploitation could provide arbitrary command execution under the account running the agent. The attacker could potentially read or modify files available to that account, alter the OpenClaw workspace, tamper ...[truncated 304 chars]- Remediation
View remediation
` must never be substituted into a shell command without validation. ]]>
