T09 · Insecure Skill Coding Practices
- Location
SKILL.md:35- Finding
Shell Command Injection Through Unescaped User-Controlled Arguments
- Content
View full analysis
--message ""` Quoted reply (needs message id, usually from `messages list/search/show/context`): - `wacli send text --to --message "" --reply-to ` React: - `wacli send react --to --id [--reaction ""]` ## Send a file - `wacli send file --to --file [--caption ""] [--filename ] [--mime ]` ## Finding chats / message ids - Search messages: - `wacli messages search ""` ``` ### Technical Analysis The Skill tells the Agent to execute `wacli` commands while placing user-controlled values directly into shell-style command templates. The affected values include recipients, message text, message IDs, reactions, file paths, captions, display names, MIME types, and search queries. Double quotes do not provide sufficient shell safety when substituted values can themselves contain quotes, command substitutions, backticks, newlines, or other shell metacharacters. Several parameters, including phone numbers, JIDs, message IDs, file paths, display names, and MIME types, are not quoted at all. If the `exec` facility passes the constructed command through a shell, malicious input can terminate the intended argument and introduce additional shell syntax. The resulting commands would execute with the same operating-system privileges as the Agent or its runtime process. ### Attack Path 1. An attacker supplies content used by the Skill, such as message text, a search query, caption, filename, file path, recipient, or message ID. 2. The supplied value contains shell syntax designed to escape the intended argument, such ...[truncated 1246 chars]- Remediation
View remediation
