T09 · Insecure Skill Coding Practices
- Location
reference/search-user.md:20- Finding
Shell Command Injection Through Unescaped User-Controlled Parameters
- Content
View full analysis
&page=&userType=' \ --header 'x-api-key: ' \ --header 'Content-Type: application/json' ``` POST request example from `reference/user-data.md:20-27`: ```bash curl -s --location 'https://api.xsdata.top/api/v1/goa/douyin/fetch-user-data' \ --header 'x-api-key: ' \ --header 'Content-Type: application/json' \ --data '{ "sec_user_id": "", "share_text": "" }' ``` The same unsafe construction pattern appears in the other listed reference files. ### Technical Analysis The Skill directs the agent to parse values from `$ARGUMENTS` or interactive user input and substitute them directly into shell command templates. Parameters such as `keyword`, `share_text`, `sec_user_id`, `aweme_id`, pagination cursors, and filtering values are placed inside single-quoted shell strings without shell-safe escaping. A single quote supplied inside one of these parameters can terminate the intended quoted string. Subsequent shell metacharacters can then introduce additional commands. This affects both: - Query parameters embedded in a single-quoted URL. - Values embedded in a single-quoted JSON request body. The documentation does not require strict validation, structured argument passing, URL encoding, or JSON serialization before invoking `curl`. Consequently, an agent that follows these templates through a shell may interpret attacker-controlled input as shell syntax instead of data. ...[truncated 1618 chars]- Remediation
View remediation
