T09 · Insecure Skill Coding Practices
- Location
SKILL.md:32- Finding
Shell Command Injection Through Unsafe Template Substitution
- Content
View full analysis
", "expiryTime": , "domain": ""}' ``` ```bash curl -s -X DELETE "https://chat-tempmail.com/api/emails/" -H "X-API-Key: $TEMP_EMAIL_API_KEY" ``` ```bash curl -s "https://chat-tempmail.com/api/emails/" -H "X-API-Key: $TEMP_EMAIL_API_KEY" ``` ```bash curl -s "https://chat-tempmail.com/api/emails//" -H "X-API-Key: $TEMP_EMAIL_API_KEY" ``` ```bash curl -s -X DELETE "https://chat-tempmail.com/api/emails//" -H "X-API-Key: $TEMP_EMAIL_API_KEY" ``` ```bash curl -s -X POST https://chat-tempmail.com/api/webhook \ -H "X-API-Key: $TEMP_EMAIL_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "", "enabled": true}' ``` ### Technical Analysis The Skill authorizes `Bash(curl *)` and instructs the Agent to replace placeholders with values originating from users or API responses. These values include email prefixes, domains, expiration values, email IDs, message IDs, pagination cursors, and webhook URLs. The instructions do not require: - Strict validation of identifiers or numeric values. - JSON serialization of request-body fields. - URL encoding of path and query parameters. - Rejection of shell metacharacters. - Construction of arguments without shell interpretation. Values placed inside the single-quoted JSON templates can terminate the existing quote if they contain an apostrophe. Values placed inside double-quoted URL templates can introduce shell substitutions such as command substitution if the Agent reproduces them directly when constructing ...[truncated 2165 chars]- Remediation
View remediation
