Skip to content
SSRF Write-up Advanced

Blind SSRF Low Impact to XSS & bypass CSP

The proxy endpoint fetched arbitrary URLs, causing a blind SSRF, and returned 403 for non-image content. By hosting a PDF with JavaScript and serving it as a .png, the attacker bypassed the image check and CSP, achieving XSS.

medium.com

Published on medium.com

Besm Allah Hello my friends today i will Shear with you my Blind SSRF and Escalation to XSS By “bypass CSP”.

CyH1337, 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

Likely the proxy endpoint did not validate the URL scheme or content type properly, and the CSP was misconfigured with an empty hash, allowing a PDF with JavaScript to execute.

Impact

An attacker could execute arbitrary JavaScript in the context of the vulnerable site, potentially leading to session hijacking or other client-side attacks, though the initial SSRF was blind and low impact.

What the attacker needed

Attacker-controlled server; victim visits crafted URL

How it was found

  1. Send a request to the proxy endpoint with a Collaborator URL as the source parameter.
  2. Observe a 403 response but receive a Collaborator interaction, confirming blind SSRF.
  3. Host a file with an XSS payload and a .png extension, using .htaccess to serve it as HTML.
  4. Request the .png file through the proxy and observe a 200 response but no alert due to CSP.
  5. Create a PDF with JavaScript and serve it as a .png via a PHP script.
  6. Request the PDF through the proxy and observe the JavaScript alert, bypassing CSP.

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 website had a feature that fetched images from any URL you gave it. The attacker could make the server fetch a URL they controlled, which is called blind SSRF because the attacker does not see the response. Then they tricked the site into showing a PDF file that ran JavaScript, bypassing the site's security policy (CSP) that normally blocks scripts.

What is SSRF?

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.

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.