T09 · Insecure Skill Coding Practices
- Location
SKILL.md:26- Finding
Unvalidated and Unquoted User-Controlled URL Passed to a Shell Command
- Content
View full analysis
` content, which removes JSON-LD blocks. Use `seogeo fetch` instead: ```bash seogeo fetch --json ``` ``` ### Technical Analysis The skill directs the Agent to substitute a target URL into a Bash command without quoting the argument or prescribing any input validation. If the Agent inserts user-controlled input literally, shell metacharacters such as `;`, `&&`, command substitutions, or redirection operators may be interpreted by the shell rather than treated as part of the URL. The instruction also does not restrict URL schemes, destination addresses, DNS resolution, redirects, or ports. Consequently, the fetch operation could be directed toward loopback, private, link-local, or cloud metadata addresses. Whether a particular request succeeds depends on the validation implemented by the undocumented `seogeo` executable and the network permissions of the Agent environment. ### Attack Path #### Command-Injection Path 1. An attacker supplies a crafted target value containing shell syntax, such as: ```text https://example.com; attacker-controlled-command ``` 2. The Agent follows the documented workflow and substitutes that value directly into: ```bash seogeo fetch https://example.com; attacker-controlled-command --json ``` 3. The shell treats the semicolon as a command separator. 4. The injected command executes with the operating-system permissions granted to the Agent process. This path applies when substitution is performed literally in a shell command without argument-safe quoting or validation. #### SSRF Path 1. An attacker supplies a URL targeting an internal resource, such as a loopback service, RFC1918 address, link-local endpoint, or cloud metadata ...[truncated 1112 chars]- Remediation
View remediation
