Skip to content
SSRF Write-up Intermediate

Out of Scope, In the Money: How SSRF in a PDF Export Got Me Deep

A PDF export endpoint accepted an arbitrary URL and fetched it server-side, allowing an attacker to reach internal services. The attacker could render an internal admin dashboard and extract a sensitive token.

iski Follow

Published on infosecwriteups.com

Free Link🎈

Iski, 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 PDF export endpoint did not validate or restrict the URL parameter, allowing requests to internal hosts.

Impact

The attacker could access internal services and obtain a sensitive token, potentially leading to further access to internal systems.

What the attacker needed

Access to the PDF export endpoint; ability to supply a URL parameter

The fix

The PDF export feature should whitelist allowed domains and block requests to internal IP addresses and metadata services.

How it was found

  1. Send a request to the PDF export endpoint with a URL pointing to localhost.
  2. Observe a change in response time indicating the server made the request.
  3. Try URLs for internal services such as a metadata IP, an internal API, and Redis.
  4. Use the internal API dashboard URL to render the admin page inside the PDF.
  5. Download the PDF and extract the sensitive token shown.

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 PDF export feature took a web address from the user and fetched it from the server. Because the server could reach internal systems that outsiders cannot, an attacker could make it fetch an internal admin page and see the result in the PDF. This is called server-side request forgery (SSRF).

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 iski

View all

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