T09 · Insecure Skill Coding Practices
- Location
SKILL.md:34- Finding
Unquoted Path Placeholders in the Documented Shell Command
- Content
View full analysis
--output ``` ### Technical Analysis The documented invocation quotes `{baseDir}` but does not quote the replaceable input and output path arguments. If an agent constructs this command as a shell string and substitutes user-controlled path values directly into the placeholders, shell metacharacters within those values can be interpreted as additional shell syntax. For example, a malicious input path containing a command separator could cause the shell to execute an additional command rather than treating the entire value as one filename. The Python script itself does not invoke a shell and is not directly vulnerable; the issue exists in the documented method by which an agent may invoke the script. Exploitation therefore requires all of the following conditions: 1. The agent accepts an attacker-controlled or insufficiently validated input or output path. 2. The path is substituted directly into the documented command. 3. The resulting command is executed through a shell rather than through an argument-array API. 4. The substituted value is not safely quoted or escaped. ### Attack Path 1. An attacker requests processing of a filename containing shell metacharacters, such as a command separator followed by an operating-system command. 2. The agent places that value into the unquoted `` or `` position. 3. The agent passes the assembled command string to a shell. 4. The shell treats the metacharacters as syntax and executes the injected command. 5. The injected command runs with the operating-system permissions of the agent process. ### Impact Assessment Successful exploitation can provide arbitrary command execution under the current agent account. The re ...[truncated 536 chars]- Remediation
View remediation
