Skip to content
SSRF Write-up Intermediate

From a PDF Export Button to Full AWS Credential Theft: An SSRF Wr

The PDF export feature fetched a user-supplied logo URL server-side without validation, allowing an attacker to make the server request internal resources. By pointing the URL at the AWS instance metadata service, the attacker could retrieve live IAM credentials for the EC2 instance.

T4nv1 Follow

Published on medium.com

Some of the most damaging bugs I’ve found didn’t come from exotic payloads or hours of fuzzing — they came from a feature nobody thinks to attack because it looks completely mundane. This time it was an “Export as PDF” button.

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 export feature accepted an arbitrary URL for the logo and fetched it server-side without an allowlist or blocking of internal addresses, and the EC2 instance used IMDSv1 with a broadly permissioned IAM role.

Impact

An authenticated user could obtain live AWS IAM credentials scoped to the application's infrastructure, potentially leading to broader compromise of the hosting environment; the attacker stopped before using the credentials against any AWS API.

What the attacker needed

An authenticated user account; access to the report export feature

The fix

The metadata endpoint was blocked at the network layer as an immediate mitigation, then IMDSv2 was enforced account-wide and a URL allowlist was added to the export feature.

How it was found

  1. Send a report export request with a logo_url pointing to an attacker-controlled server and observe the incoming request in Burp Collaborator.
  2. Change logo_url to the AWS metadata service address to confirm internal access.
  3. Use the debug=true parameter to view the raw response instead of a rendered PDF.
  4. Request the IAM security credentials path to obtain the role name.
  5. Request the role-specific credentials path to retrieve the temporary access key, secret key, and session token.

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 server-side request forgery (SSRF) happens when a website lets you supply a URL that the server then fetches on your behalf. If the server can reach internal addresses that you cannot, you can use it as a proxy to read private data. Here, the PDF export feature fetched a logo image from any URL, so the attacker pointed it at a special cloud address that returns secret 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 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.