Skip to content
SSRF Write-up Beginner

SSRF in Action: Metadata Exploitation in Cloud via a Vulnerable

The article shows a PHP endpoint that fetches any user-supplied URL without validation, allowing an attacker to make the server request internal cloud metadata. This could leak IAM credentials from the AWS metadata service.

zoningxtr Follow

Published on medium.com

ByZoningxtr

Zoningxtr, 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

Likely the application passes user-controlled input directly to a URL-fetching function without validating or restricting the destination.

Impact

An attacker could retrieve IAM credentials from the metadata service, potentially leading to full or partial compromise of the cloud environment.

What the attacker needed

A URL parameter that fetches remote content; Server has access to cloud metadata service

The fix

The application should validate and restrict URLs to an allowlist of permitted destinations, and block access to internal metadata addresses.

How it was found

  1. Intercept the target request in Burp.
  2. Replace the URL parameter with the metadata service address.
  3. Check if the response contains metadata such as ami-id or instance-id.
  4. Try accessing the IAM security credentials path.
  5. Then access the specific role name path to retrieve 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 server takes a web address from the user and fetches it without checking where it points. An attacker can give it an internal address that only the server can reach, such as a cloud metadata service, and read sensitive information like access keys.

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 zoningxtr

View all

7 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.