T09 · Insecure Skill Coding Practices
- Location
SKILL.md:18- Finding
Shell Command Injection Through Unsafe Argument Construction
- Content
View full analysis
HTML content" ``` ```bash # Lines 41–44: Unquoted message ID and user-controlled reply body ravi email reply --body "Reply content
" ravi email reply-all --body "Reply content
" ``` ```bash # Line 52: Unquoted message ID, recipient, and body ravi email forward --to "recipient@example.com" --body "FYI — see below.
" ``` ### Technical Analysis The skill directs an agent to construct shell commands using values that may originate from users or email content, including contact names, recipient addresses, subjects, HTML bodies, and message identifiers. Placing a value inside double quotes does not make arbitrary input safe for shell evaluation. Shell constructs such as `$(command)` and backtick command substitution remain active inside double-quoted strings. For example, if an attacker-controlled subject is inserted literally into the documented template as `$(malicious-command)`, the shell may execute that command before invoking `ravi`. The `` argument is shown without quoting. If an agent directly substitutes an untrusted or insufficiently validated identifier, shell metacharacters, whitespace, additional command-line options, or command separators may alter the intended command. Values beginning with a hyphen may also be interpreted as options unless the CLI supports and uses an end-of-options delimiter. The vulnerability arises when an implementation builds a command as a shell-evaluated string rather than invoking t ...[truncated 1980 chars]- Remediation
View remediation
