T09 · Insecure Skill Coding Practices
- Location
SKILL.md:49- Finding
Shell Command Injection Through User-Controlled Command Arguments
- Content
View full analysis
" ``` ```bash yummycli gemini speak \ --text "" \ --voice Kore \ --output narration.wav ``` ### Technical Analysis The documented command templates place user-controlled narration text directly inside shell commands. Although the placeholder is enclosed in double quotes, double-quoted Bash strings still process command substitutions such as `$(command)` and backtick expressions when those expressions become part of the command text parsed by the shell. The output path may also be user-controlled. If an agent constructs a shell command as a string by replacing these placeholders, malicious quotation marks, command substitutions, redirections, or shell metacharacters could alter the intended command. This issue applies when the agent generates or executes a shell command from the documented template. It can be avoided by invoking the executable directly with a structured argument array and without a shell. ### Attack Path 1. An attacker requests speech synthesis using malicious text, such as text containing `$(malicious-command)` or a quotation mark followed by shell syntax. 2. The agent substitutes the supplied text into the documented Bash template. 3. The resulting command string is passed to a shell for execution. 4. The shell interprets the injected command substitution or metacharacters before or alongside execution of `yummycli`. 5. The injected command runs with the operating-system privileges and environment available to the agent. ### Impact Assessment Successful exploitation could allow arbitrary local command execution with the agent's privileges. Depending on the execution environment, this could permit: - Reading or modifying files accessible to the agent. - Accessing environment vari ...[truncated 389 chars]- Remediation
View remediation
