Skip to content
SSRF Write-up Beginner

I Found a Critical SSRF Vulnerability That Could Have Exposed an

A server-side URL fetch endpoint used to generate image previews could be pointed at the AWS instance metadata service, letting the attacker read temporary IAM credentials. The author stopped at proof of concept and did not use the credentials.

Hacker MD Follow

Published on infosecwriteups.com

It looked like a simple image upload feature. Nothing special.

Hacker MD, on infosecwriteups.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 preview-fetch endpoint accepted arbitrary user-supplied URLs and made server-side requests without an allowlist or a block on the cloud metadata address.

Impact

An attacker could use the exposed IAM credentials to reach S3 buckets, read database snapshots, or potentially take over the AWS infrastructure; the author did not actually use them.

What the attacker needed

Access to the preview endpoint; ability to supply an arbitrary URL; out-of-band listener for confirmation

The fix

The text says the fix was deployed in 48 hours and recommends blocking the metadata address, using a strict outbound URL allowlist, and switching to IMDSv2.

How it was found

  1. Send a request to the preview endpoint with a URL pointing at a Collaborator host and observe the DNS callback.
  2. Change the URL to the AWS metadata address and read the directory listing in the response.
  3. Request the IAM security-credentials path to see the role name.
  4. Request the role's credential path to obtain temporary access keys.

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 website had a feature that downloaded an image from any web address you gave it. The author gave it an address that only the server itself can reach, which is where cloud servers keep their login keys, and the server handed those keys back. That means someone outside could get the same keys and act as the server inside the cloud account.

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 Hacker MD

View all

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