Skip to content
SSRF Write-up Intermediate

PDF Generators: The SSRF Attack Surface You are Overlooking

PDF generators that fetch user-supplied URLs or render uploaded HTML can be abused for server-side request forgery, letting an attacker make the server request internal addresses and read the responses inside the generated PDF. The author also describes a file-upload variant (CVE-2025-55853) where a crafted HTML file causes the converter to include local system files in the PDF.

RE:HACK Follow

Published on blog.rehack.xyz

You have probably tested for SSRF in standard web forms. Everyone has.

re:hack, on blog.rehack.xyz

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 conversion service fetches user-controlled URLs and renders referenced resources without validating protocols or blocking private and loopback addresses.

Impact

An attacker could map internal networks, read internal service responses and local files, and potentially reach services such as Redis to escalate further; the text does not show a working end-to-end exploit beyond the described technique.

What the attacker needed

A PDF generator that fetches URLs or renders uploads; no URL or protocol validation; ability to download the generated PDF

The fix

The service should allowlist http and https, resolve hostnames and block private and loopback addresses, run the converter in an isolated network with restricted egress, and keep third-party PDF libraries patched.

How it was found

  1. Find a URL-to-PDF endpoint or a file-upload-to-PDF converter.
  2. Submit a URL pointing at localhost or a cloud metadata address to confirm SSRF.
  3. Vary the port number and observe response times and PDF contents to map internal services.
  4. For the file-upload variant, upload an HTML file that references a local file via the file:// protocol.
  5. Download the generated PDF and read the internal response or local file contents.

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 generator often works by asking the server to fetch a web page and turn it into a document. If it accepts any address, an attacker can give it an internal address that only the server can reach, and the resulting PDF shows what that internal service returned. A second variant lets an uploaded HTML file pull in local files from the server's disk.

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 RE:HACK

View all

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