T09 · Insecure Skill Coding Practices
- Location
SKILL.md:92- Finding
Shell Command Injection Through Unsafely Interpolated Style Data
- Content
View full analysis
\", \"negative_tags\": \"vocals, lyrics, singing, spoken word\" }") TASK_IDS[$i]=$(echo $RESP | jq -r '.task_id') echo "Version $i task: ${TASK_IDS[$i]}" done ``` ### Technical Analysis The style value is derived from the user's natural-language description and is shown as being inserted directly into a double-quoted shell argument. The value is not encoded as JSON and is not safely separated from shell syntax. If an agent implements the documented placeholder by substituting the generated style directly into the command text before shell execution, an attacker can supply quotes, command substitutions, backticks, or shell control operators that terminate the intended JSON argument and introduce additional commands. A payload containing syntax such as `" ; ; echo "` could modify the resulting shell program. Even when command execution is not achieved, unescaped quotation marks, backslashes, control characters, or newlines can corrupt the JSON request or alter its fields. This makes the issue both a command-injection risk and an input-integrity flaw. ### Attack Path 1. An attacker submits a video or music description containing shell syntax designed to survive the style-generation step. 2. The agent incorporates the attacker-controlled text into one or more generated style strings. 3. The agent replaces `` in the documented command with that text. 4. The resulting command is passed to a shell. 5. Injected syntax terminates or modi ...[truncated 1034 chars]- Remediation
View remediation
