T09 · Insecure Skill Coding Practices
- Location
--folder <folder> # Multiple files (shell glob) pixelvault upload *.png --folder screenshots ``` ``` ### Technical Analysis The documented single-file command interpolates `$ARGUMENTS` directly into a shell command without quoting, validation, or an end-of-options delimiter. The `files` argument is user-controlled and may therefore contain shell metacharacters such as `;`, `&&`, command substitutions, redirections, or additional command-line options. If an agent follows these instructions using a shell, ...[truncated 1859 chars]:33- Finding
Shell Command Injection Through Unquoted User-Controlled Arguments
- Content
View full analysis
--folder # Multiple files (shell glob) pixelvault upload *.png --folder screenshots ``` ``` ### Technical Analysis The documented single-file command interpolates `$ARGUMENTS` directly into a shell command without quoting, validation, or an end-of-options delimiter. The `files` argument is user-controlled and may therefore contain shell metacharacters such as `;`, `&&`, command substitutions, redirections, or additional command-line options. If an agent follows these instructions using a shell, shell syntax embedded in the supplied value can be interpreted as executable syntax rather than as a literal filename. Filenames beginning with `-` may also be parsed as unintended CLI options. Although glob expansion is an intended feature, directly combining arbitrary input with shell evaluation creates a command-injection boundary. The invocation should instead pass each validated path as a distinct process argument without invoking a shell. ### Attack Path 1. An attacker provides an upload request containing a crafted file argument, such as a filename followed by shell control operators and another command. 2. The agent substitutes that value into `pixelvault upload $ARGUMENTS`. 3. The command is executed through a shell. 4. The shell parses the injected metacharacters or command substitutions. 5. The injected command runs under the same operating-system account and privileges as the agent. Successful exploitation does not require a vulnerability in PixelVault itself because execution occurs during shell parsing, before or alongside CLI execution. ### Impact Assessment An attacker may execute arbitrary loca ...[truncated 616 chars]- Remediation
View remediation
