Skip to content
SSRF Write-up Intermediate

$4,200 Bug Bounty: Escalating Blind SSRF to Internal Cloud Metadata & Credential Exfiltration

An avatar-import feature fetched user-supplied URLs without re-checking the resolved IP address, so a domain pointing at the cloud metadata service bypassed the private-IP filter. The attacker could read the instance's IAM role name and temporary AWS credentials, giving access to production S3 buckets and databases.

T4nv1 Follow

Published on medium.com

Server-Side Request Forgery (SSRF) occurs when a backend server fetches a remote resource without validating the user-supplied URL. While basic SSRF often results in a low-severity finding (like pinging external IP addresses), mapping internal microservices can escalate the severity to Critical.

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 backend validated the hostname string but did not re-validate the resolved IP address before making the request, a time-of-check to time-of-use gap.

Impact

The attacker could obtain temporary AWS credentials for the instance role, potentially granting read/write access to production S3 buckets and internal databases; the text does not show whether the credentials were actually used.

What the attacker needed

An authenticated account; ability to set an avatar URL; attacker-controlled domain with custom DNS

The fix

The report recommends enforcing IMDSv2, validating the destination IP after DNS resolution, and restricting outbound egress; it does not state that a fix was deployed.

How it was found

  1. Submit an avatar URL pointing to an external listener to confirm the server makes outbound requests.
  2. Try the metadata address directly and observe the private-IP block.
  3. Set up a domain whose A record points to the metadata address and submit it as the avatar URL.
  4. Query the IAM security-credentials path through that domain to obtain the role name.
  5. Query the role path to retrieve temporary AWS 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.

The site let users give a web address for an avatar image, and the server fetched it. The server blocked obvious internal addresses, but it checked the name before looking up where it actually pointed. By using a domain name that resolves to the cloud's internal metadata address, the attacker made the server fetch sensitive 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.