Full-Read SSRF via DNS Rebinding & AWS IMDSv2 Token Relay in Mult
The webhook test feature validated a URL's hostname by resolving it once, then let the HTTP client resolve it again when sending the request, so a DNS server that alternated answers could pass the check with a public IP and then point the request at the AWS metadata service. Because the feature allowed choosing the HTTP method and custom headers, the attacker could fetch an IMDSv2 token and then read the instance's IAM role credentials.
While analyzing the automated notification engine of an enterprise SaaS platform (analytics.target.com), I uncovered a critical Server-Side Request Forgery (SSRF) flaw.
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
The URL validator resolved the hostname to check it, but the HTTP client resolved the same hostname again when connecting, creating a time-of-check to time-of-use gap that DNS rebinding could exploit.
Impact
An attacker could obtain temporary IAM credentials for the application's role and pivot to internal microservices, though the report does not show what those credentials actually allowed.
What the attacker needed
A user account able to configure webhooks; attacker-controlled DNS with low TTL; webhook feature allows PUT and custom headers
The fix
The report recommends resolving the hostname once, validating the IP, and then connecting to that exact IP while keeping the original Host header, plus egress rules blocking the metadata address and an IMDS hop limit of 1.
How it was found
- Set up an authoritative DNS server with a zero TTL that alternates between a public IP and the metadata IP for one hostname.
- Submit a webhook test request whose URL uses that hostname, with the PUT method and the IMDSv2 token TTL header.
- Read the returned response body to obtain the IMDSv2 token.
- Send a second webhook test request to the credentials path with the token header to retrieve the IAM role credentials.
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.
A webhook is a feature where a site sends a request to a URL you give it. The site checked the URL's address once to make sure it was not internal, but looked it up again when actually sending the request, so a clever DNS server could give a safe answer first and an internal address second. That let the attacker make the server talk to a cloud service that hands out temporary passwords.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.