Skip to content
SSRF Write-up Intermediate

P4 to P2 - The story of one blind SSRF

An HTML file upload feature that converted files to PDF allowed an attacker to include local files via an img tag, bypassing a filter that blocked the file:// scheme. This enabled blind local SSRF, allowing the attacker to read local files on the server.

Mikhail Klyuchnikov Follow

Published on mike-n1.github.io

Hello everyone. This is my second blog post where I want to tell how I managed to get Blind Local SSRF (P2) instead of External SSRF (P4).

Mikhail Klyuchnikov (@__Mn1__), on mike-n1.github.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 file upload filter only checked for the literal string 'file://' and did not normalise whitespace or control characters, allowing a tab character to bypass the check.

Impact

An attacker could cause the server to read local files, potentially leading to information disclosure, though the attack is blind and the text does not specify what data could be extracted.

What the attacker needed

Ability to upload HTML files; server processes HTML and converts to PDF

How it was found

  1. Upload an HTML file containing an img tag that references a local file using the file:// scheme with a tab character inserted.
  2. The server processes the HTML and attempts to load the local file as an image.
  3. Observe that the filter is bypassed and the local file is accessed.

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 application let users upload HTML files that were later turned into PDFs. The uploader tried to block local file access by filtering out the text 'file://', but the attacker found a way around it by inserting a tab character. This let them make the server read files from its own disk, which is a blind SSRF (server-side request forgery) because the attacker cannot see the file contents directly but can infer their existence.

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 Mikhail Klyuchnikov

View all

1 more disclosed report, 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.