Skip to content
SSRF Write-up Intermediate

Road to SSRF : PDF generation and filter bypass on ASP.net application

The application's PDF export feature rendered user-controlled profile fields without proper sanitisation, and a security filter blocked common HTML tags. By encoding payloads in full-width Unicode characters, the filter was bypassed and the server-side PDF renderer executed injected HTML, allowing the attacker to read local files and internal network resources.

supr4s Follow

Published on supras.io

Toggle

Supr4s, on supras.io

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 generation component embedded user input into HTML without proper output encoding, and the input filter only checked for standard ASCII characters, missing full-width Unicode equivalents that the parser later normalised.

Impact

The attacker could read local files, enumerate directories, access network shares, and steal NTLMv2 hashes, potentially leading to further compromise.

What the attacker needed

Access to profile editing; PDF export feature

How it was found

  1. Identify the PDF export feature that includes profile fields.
  2. Test basic HTML injection like bold tags and observe a 500 error from the security filter.
  3. Encode the payload using full-width Unicode characters to bypass the filter.
  4. Confirm the payload is normalised and executed in the generated PDF.
  5. Use an iframe to trigger a callback to an external server.
  6. Use iframe with file:// URLs to read local files and list directories.

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.

When a website creates a PDF from your profile, it may insert your text into a web page before converting it. If that text is not cleaned, you can add HTML tags that make the PDF generator fetch other files or web addresses. Here, a filter tried to block such tags, but using special wide characters (like full-width '<') slipped past the filter and the server converted them back to normal characters.

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 supr4s

View all

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