T09 · Insecure Skill Coding Practices
- Location
SKILL.md:26- Finding
Unrestricted User-Controlled URL Retrieval Enables Server-Side Request Forgery
- Content
View full analysis
" ``` ``` ### Technical Analysis The Skill instructs the Agent to pass a user-provided PDF URL directly to `curl`. Although the URL is enclosed in shell quotes, which reduces conventional shell-command injection risk, no validation is applied to: - The URL scheme - The destination hostname or resolved IP address - The destination port - Redirect targets - The response size or download duration - The response content type or PDF file signature The `-L` option causes `curl` to follow redirects. Consequently, even if an initial URL points to a public host, that host can redirect the Agent to a loopback, private-network, link-local, or cloud metadata address. Depending on the installed `curl` build and accepted input, non-HTTP schemes may also be reachable unless explicitly prohibited. Because the request originates from the Agent host, it carries that host's network reachability rather than the user's network reachability. ### Attack Path 1. An attacker submits a purported PDF URL that targets an internal service, loopback endpoint, link-local metadata service, or an attacker-controlled public redirector. 2. The Skill executes: ```bash curl -L -o /tmp/paper.pdf "" ``` 3. `curl` connects from the Agent environment and follows any supplied redirect chain. 4. The internal or otherwise restricted response is written to `/tmp/paper.pdf`. 5. The Skill subsequently processes the downloaded response with PDF extraction or other analysis tools. 6. Depending on response handling, the attacker may infer service availability or cause retrieved content to be included in generated reports and slides. ### Impact ...[truncated 575 chars]- Remediation
View remediation
