The Curious Case of the Wandering URL (SSRF Discovery)
The application fetched user-supplied URLs server-side without validation, allowing requests to internal addresses and cloud metadata endpoints. An attacker could reach internal services and potentially obtain temporary cloud credentials.
medium.com
Published on medium.com
Crawled the app with Burp Spider and manual browsing looking for parameters that accept external URLs (avatarurl, importurl, webhook, callback, url, etc.).
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the server-side URL fetcher did not validate or restrict the destination address, allowing requests to internal IP ranges and cloud metadata endpoints.
Impact
An attacker could access internal services and potentially obtain temporary cloud credentials, which could lead to privilege escalation or data exfiltration.
What the attacker needed
Authenticated user account; app feature accepts a URL; server fetches the URL
The fix
The fetcher should use a strict allowlist of domains, block private and metadata addresses, route requests through a validating proxy, and require IMDSv2 with least-privilege roles.
How it was found
- Crawl the app to find parameters that accept external URLs, such as avatar_url or webhook.
- Send a benign public URL and confirm the server fetches it and returns metadata.
- Send internal IP addresses and the cloud metadata IP, observing timing or error differences.
- Use an out-of-band domain to confirm the server makes outbound requests.
- Probe cloud metadata endpoints and internal APIs, limiting requests to read-only queries.
- Extract returned metadata, such as IAM role name and temporary credentials, where allowed.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
The app let users give it a web address to fetch a picture or data from. The server then visited that address without checking where it pointed. An attacker could give it an address inside the company's own network, like a cloud server's secret metadata page, and the server would fetch it, potentially leaking sensitive information.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.