Skip to content
SSRF Write-up Intermediate

The Cat-and-Mouse Game of a Cloud Metadata SSRF Vulnerability

The application allowed users to supply a URL for a REST API data source, which it fetched without restriction, enabling blind SSRF. Attackers could reach the cloud metadata service and retrieve sensitive credentials, and later bypass two attempted fixes using DNS tricks.

systemweakness.com

Published on systemweakness.com

In the world of application security, few vulnerabilities are as simultaneously subtle and devastating as a Server-Side Request Forgery (SSRF). What begins as a seemingly innocent feature — an app that fetches data from a user-supplied URL — can quickly become a gateway to an organization’s most sensitive internal…

Ramshath, on systemweakness.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

Likely the application failed to validate or restrict the destination of user-supplied URLs, allowing requests to internal or link-local addresses such as the cloud metadata service.

Impact

The attacker could retrieve cloud instance metadata including sensitive credentials, potentially leading to full cloud compromise; the text does not state whether the final fix was effective.

What the attacker needed

Ability to create an app with a REST API data source; cloud-hosted application; no authentication bypass needed

The fix

The proper fix is to use an allowlist of known-good fully qualified domain names and block all internal, private, and link-local IP addresses; the text does not confirm that this was implemented.

How it was found

  1. Supply a URL pointing to a Burp Collaborator domain to confirm outbound requests.
  2. Point the application at the cloud metadata IP address to see if it responds.
  3. Add the required path and a Metadata header to retrieve the full metadata JSON.
  4. After a blacklist fix, use a wildcard DNS service that embeds the forbidden IP in a hostname to bypass the string check.
  5. After an IP-resolution check fix, use a DNS rebinding service that first resolves to an allowed IP and then to the metadata IP.
  6. Send the rebinding domain to the application, which passes the initial check and then connects to the metadata service on the second lookup.

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.

This app let you give it a web address, and it would go fetch data from that address for you. The problem was it didn't check where it was going, so attackers could make it fetch secret internal addresses, like the cloud's own configuration page that holds passwords. That's called server-side request forgery (SSRF): tricking a server into making requests it shouldn't.

What is SSRF?

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

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.