T09 · Insecure Skill Coding Practices
- Location
SKILL.md:35- Finding
Unrestricted User-Controlled URL Fetching Enables SSRF
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 35–37
Vulnerability Type: Server-Side Request Forgery through unrestrictedcurlusage
Risk Level: MediumVulnerable Code:
markdown **If the user provides a URL (YouTube, Spotify, RSS, etc.):** - Use `curl` to fetch the page and extract any available transcript or description. - If no transcript is available, tell the user: "No transcript found at this URL. Please paste the transcript text directly."Technical Analysis
The skill instructs the agent to fetch a user-supplied URL with
curlwithout defining security controls for URL schemes, destination hosts, DNS resolution, redirects, or response size. Consequently, an attacker may provide URLs that target loopback, private, link-local, or otherwise restricted resources reachable from the agent's runtime.Depending on the runtime's
curlconfiguration, non-HTTP schemes such asfile://may also permit access to local files. Redirects and DNS rebinding could bypass superficial hostname checks unless destinations are validated after DNS resolution and on every redirect.Although this instruction retrieves content rather than executable code, the fetched material enters the agent's processing context and may be disclosed through generated podcast assets.
Attack Path
- An attacker invokes the skill with a crafted episode URL instead of a transcript.
- The URL targets a sensitive resource, such as a loopback service, private-network endpoint, cloud metadata service, or local file supported by
curl. - Following
SKILL.md, the agent executescurlagainst the attacker-controlled destination. - The runtime retrieves content using its own network access and privileges.
- The agent processes the response as a transcript or episode description.
- Sensitive response data may be reproduced in show notes, social posts, metadata, or other generated output and returned to the attacker.
Redirect chains or DNS rebindi ...[truncated 715 chars]
- Remediation
View remediation
Remediation Suggestions
- Permit only
https://URLs and explicitly reject all other schemes, includingfile,ftp,gopher, anddata. - Use an allowlist of expected public podcast, RSS, and video hosts where practical.
- Resolve the hostname before connecting and reject loopback, private, link-local, multicast, reserved, and unspecified IP ranges for both IPv4 and IPv6.
- Repeat destination validation after every DNS resolution and redirect; do not rely solely on the original hostname.
- Disable redirects unless required. If enabled, set a small redirect limit and validate each destination.
- Apply strict connection, transfer, and total timeouts.
- Limit response size and reject unsupported content types.
- Run retrieval through an isolated outbound proxy with network-level controls that cannot access internal services or cloud metadata endpoints.
- Treat fetched pages as untrusted data and ensure their contents cannot introduce new agent instructions.
- Prefer a dedicated transcript-fetching component with a constrained API instead of issuing unrestricted
curlrequests.
- Permit only
