T09 · Insecure Skill Coding Practices
- Location
input-handling.md:35- Finding
Unrestricted Retrieval of User-Controlled URLs
- Content
View full analysis
Vulnerability Details
File Location:
input-handling.md:9-11, 35-40
Vulnerability Type: Server-Side Request Forgery (SSRF) through unrestricted URL retrieval
Risk Level: MediumVulnerable Code Snippet
markdown - Paper titles - Paper URLs - Uploaded PDF filesmarkdown #### If the input is a URL 1. Inspect whether the URL is already a PDF. 2. If not, identify the paper landing page and locate the PDF link. 3. Verify title, venue, and year when possible. 4. Retrieve the PDF full text.Technical Analysis
The skill instructs the agent to inspect user-supplied URLs and retrieve either the original resource or a PDF link discovered on the landing page. It does not define controls for:
- Allowed URL schemes or destination domains
- Localhost, private, link-local, reserved, or cloud metadata addresses
- DNS rebinding and destination validation
- Redirect-chain validation
- Embedded URL credentials
- Response size, timeout, and redirect limits
- MIME type and PDF signature verification
If the executing agent has network access, an attacker can provide a URL that resolves or redirects to a service that is inaccessible from the attacker’s own network position. Validation must occur after DNS resolution and after every redirect because a syntactically acceptable public URL can ultimately resolve or redirect to an internal address.
Attack Path
- An attacker submits a URL and identifies it as a research paper or paper landing page.
- The skill instructs the agent to inspect that URL.
- The URL directly targets, resolves to, or redirects to a loopback, private-network, link-local, or cloud metadata endpoint.
- The agent retrieves the destination using its own network privileges.
- The response may be processed as paper content or included in retrieval diagnostics.
- Internal data may consequently be exposed to the attacker through the agent’s output. A large or non-PDF response could also consume excessive processing re ...[truncated 706 chars]
- Remediation
View remediation
Remediation Suggestions
- Accept only
httpsURLs and reject URL credentials, malformed hosts, alternate numeric IP representations, and non-web schemes. - Resolve the hostname before making a request and reject loopback, private, link-local, multicast, reserved, unspecified, and cloud metadata address ranges for both IPv4 and IPv6.
- Repeat destination resolution and validation after every redirect; do not rely solely on validation of the initial URL.
- Where practical, restrict retrieval to an allowlist of trusted scholarly repositories and publisher domains.
- Set strict connection and read timeouts, response-size limits, redirect limits, and decompression limits.
- Require an expected PDF MIME type and verify the PDF file signature before full processing. Do not trust file extensions or response headers alone.
- Process downloaded documents with a sandboxed, least-privileged parser that has no unnecessary filesystem or network access.
- Prevent retrieved content from being treated as agent instructions; handle it strictly as untrusted document data.
- Require explicit user confirmation before retrieving content from an unrecognized domain.
- Log blocked destinations and redirect chains without recording credentials, tokens, or sensitive response bodies.
- Accept only
