Skip to content
SSRF Write-up Advanced

$14,200 for an SSRF That Shouldn’t Have Existed: Turning a Link

The webhook URL validator resolved and checked a hostname's IP at validation time, but the outbound request performed a separate DNS resolution later, allowing DNS rebinding to reach the AWS metadata service. The attacker obtained live temporary AWS credentials and confirmed the role could list S3 buckets that appeared to hold customer data.

T4nv1 Follow

Published on medium.com

Some bugs are satisfying because they’re clever. This one was satisfying because the target had clearly tried to prevent exactly what I ended up doing — and the fix just wasn’t as complete as whoever wrote it thought.

T4nv1, on medium.com

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 validator resolved and checked the hostname's IP at validation time, but the outbound request re-resolved the hostname independently with no revalidation or IP pinning.

Impact

An attacker could obtain live temporary AWS credentials for a real IAM role that could list S3 buckets appearing to hold customer data, though read/write access to bucket contents was not confirmed.

What the attacker needed

A webhook integration feature; control of a domain with configurable DNS; a test-fire or preview feature that echoes responses; target running on EC2 with IMDSv1 reachable

The fix

The report recommends resolving once and pinning the connection to the validated IP, rejecting private and link-local ranges in any encoding, enforcing IMDSv2, and scoping the IAM role; the text says IMDSv2 enforcement and IP pinning were shipped within a week.

How it was found

  1. Send a webhook URL pointing at the cloud metadata address and observe it is rejected, confirming a blocklist exists.
  2. Try alternative encodings and find that a decimal-encoded loopback address is accepted, showing the check is a naive string match.
  3. Set up a controlled domain with a very short TTL that returns a harmless public IP on the first lookup and the metadata address on the second.
  4. Submit that domain as the webhook URL and use the test-fire feature to read the response, which returns an IAM role name.
  5. Repeat the rebinding request against the credentials path for that role to obtain temporary AWS keys.
  6. Use the keys only to confirm identity and list bucket names, without reading bucket contents.

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 one service automatically sends data to a URL you provide. Here the server checked that URL was safe, but then looked up the address again later, so an attacker could make the second lookup point at an internal cloud address. That let them read secret cloud credentials.

What is SSRF?

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.

More by T4nv1

View all

113 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Server-side request forgery (SSRF)

The lesson behind this report.

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.