T09 · Insecure Skill Coding Practices
- Location
skill.md:155- Finding
Unvalidated Server-Provided URLs Enable Document Exfiltration and Payment Redirection
- Content
View full analysis
Vulnerability Details
File Location:
skill.md:155-181andskill.md:270-272
Vulnerability Type: Improper validation of remotely supplied URLs
Risk Level: MediumVulnerable Code
text Parse response: fax_id, token, upload_url, status_url, preview_url, pay_url Surface upload_url to the human (token redacted in public contexts). If cost > 0 and pay_url present: 🧑⚖️ Instruct the human to complete payment ❌ Do not auto-pay Poll status_url until terminal status: done ✅ or failed ❌bash curl -sS -X POST "<UPLOAD_URL>" \ -H "Content-Type: multipart/form-data" \ -F "file=@./document.pdf;type=application/pdf" \ -F "meta={\"cover\":\"Please deliver\"};type=application/json"text ✅ Surface pay_url to the human for payment. ✅ If explicit payment metadata is provided (wallet address/payment token), you may construct a convenience URL.Technical Analysis
The Skill instructs the agent to trust
upload_url,status_url,preview_url, andpay_urlvalues returned by the remote API. It does not require parsing these URLs or verifying their scheme, hostname, port, path, or redirect destination before presenting or using them.Consequently, a compromised API, malicious intermediary affecting the API response, or server-side response manipulation could cause the agent to use an attacker-controlled URL. The upload example is particularly sensitive because it transmits a local PDF to the supplied URL. Presenting an unvalidated payment URL can similarly direct the user to a phishing or fraudulent payment page.
Token redaction in public contexts does not resolve this issue because the complete tokenized URL may still be sent to an unauthorized host by the agent or opened by the user.
Attack Path
- An attacker compromises the remote API or otherwise gains the ability to manipulate its response.
- The response replaces
upload_url, `statu ...[truncated 899 chars]
- Remediation
View remediation
Remediation Suggestions
- Parse every server-provided URL before displaying or using it.
- Require HTTPS and reject embedded credentials, nonstandard ports, malformed URLs, and protocol-relative URLs.
- Enforce an explicit hostname allowlist, such as the exact trusted
faxagent.aihostname and any separately documented first-party upload or payment hosts. - Validate expected path prefixes for upload, status, preview, and payment endpoints.
- Disable redirects or verify the destination of every redirect against the same allowlist.
- Do not construct payment URLs from arbitrary remote metadata. Use a fixed trusted payment origin and encode each query parameter safely.
- Require explicit user confirmation before uploading a document to any URL whose origin differs from the documented service origin.
- Treat origin validation failures as fatal and display a warning without opening, polling, or uploading to the URL.
