Skip to content
SSRF Write-up Intermediate

SSRF via Flawed Request Parsing

The application validated the absolute URL in the request line instead of the Host header, allowing an attacker to bypass SSRF protections. By manipulating the Host header and absolute URL, an attacker could access an internal admin panel and delete a user.

rcxsecurity Follow

Published on medium.com

Welcome back to another Lab Walkthrough at the Cybersec Cafe. Today, I’ll be giving you the complete breakdown of my mindset as I approach an SSRF vulnerability.

Ryan G. Cox, 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 application validated the absolute URL in the request line but used the Host header to determine the actual destination, creating a mismatch that bypassed SSRF protections.

Impact

An attacker could access an internal admin panel and delete a user, potentially leading to further compromise.

What the attacker needed

Ability to send crafted HTTP requests; Internal network range known ([redacted]/24)

The fix

The application should validate the Host header consistently with the absolute URL, or use a whitelist of allowed destinations, to prevent SSRF.

How it was found

  1. Send a request with an absolute URL in the request line and observe a 200 response.
  2. Change the Host header to an internal IP and observe a 504 timeout, indicating the absolute URL is validated but the Host header is used for connection.
  3. Use Burp Intruder to brute-force the fourth octet of the internal IP range [redacted]/24, with the Host header set to the base IP and the absolute URL path set to /admin.
  4. Identify the IP that returns a 200 response, revealing the admin panel.
  5. Modify the request to POST to /admin/delete with csrf and username parameters, using the discovered IP in the Host header.
  6. Send the request and receive a 302 response, confirming the lab is solved.

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.

Server-Side Request Forgery (SSRF) is when a server is tricked into making requests to internal systems that the attacker cannot reach directly. Here, the server checked one part of the request (the absolute URL) for safety but actually used another part (the Host header) to decide where to connect, so the attacker could point it at an internal admin panel.

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 rcxsecurity

View all

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