T09 · Insecure Skill Coding Practices
- Location
SKILL.md:20- Finding
Unvalidated User-Controlled URL Navigation Enables Server-Side Request Forgery
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 20-43
Vulnerability Type: Server-Side Request Forgery through unrestricted browser navigation
Risk Level: MediumRelevant Code Snippet:
text Step 1: Extract URL Parse a normalized URL from user input and remove tracking parameters. Step 2: Browser access (mandatory) 1. browser action=start profile=openclaw 2. browser action=tabs 3. browser action=navigate targetId=<id> targetUrl=<base-URL> 4. browser action=snapshot targetId=<id> maxChars=10000 loadState=networkidleThe snippet above is an English translation of the relevant skill instructions.
Technical Analysis
The skill requires the browser to navigate to a URL derived directly from user input. It does not prescribe validation of the URL scheme, hostname, resolved IP address, port, or redirect destinations before navigation.
In particular, the instructions do not require the agent to:
- Restrict navigation to the
httpandhttpsschemes. - Reject loopback, private, link-local, multicast, or reserved IP addresses.
- Validate IPv4 and IPv6 address representations.
- Resolve hostnames and verify that they point to publicly routable addresses.
- Revalidate the destination after each HTTP redirect.
- Protect against DNS rebinding.
- Block URLs containing embedded credentials or access to nonstandard administrative ports.
Because the browser operates from the agent's environment, it may have access to network resources that are unavailable to the user. The mandatory snapshot operation can retrieve up to 10,000 characters from such a resource. The retrieved content may subsequently be incorporated into the security report or affect the agent's analysis.
Attack Path
- An attacker asks the skill to audit a URL targeting a loopback, private-network, link-local, or otherwise non-public destination. Alternatively, the attacker supplies a public U ...[truncated 1310 chars]
- Restrict navigation to the
- Remediation
View remediation
Remediation Suggestions
Implement a strict URL-validation policy before any browser navigation:
- Allow only explicitly supported
http://andhttps://URLs. - Reject URLs containing embedded usernames or passwords, malformed hosts, ambiguous numeric IP representations, or unsupported ports.
- Resolve the hostname before navigation and reject every address in loopback, private, link-local, multicast, carrier-grade NAT, documentation, reserved, and unspecified ranges for both IPv4 and IPv6.
- Revalidate all resolved addresses immediately before connection to reduce time-of-check/time-of-use and DNS-rebinding risks.
- Disable automatic redirects where possible, or validate the scheme, hostname, port, and resolved addresses of every redirect target before following it.
- Block known infrastructure metadata destinations, including link-local metadata addresses and provider-specific metadata hostnames.
- Use browser-level network isolation or an outbound proxy that permits only publicly routable Internet destinations.
- Require explicit user confirmation before accessing unusual ports or destinations that cannot be conclusively classified as public.
- Treat all retrieved page content as untrusted data. Explicitly instruct the agent not to follow commands or operational instructions embedded in audited pages.
- Avoid reproducing sensitive response content in reports. Redact credentials, tokens, internal addresses, and other secrets if unexpected non-public content is retrieved.
- Allow only explicitly supported
