Skip to content
SSRF Write-up Intermediate

Hunting SSRF in a Single Page Application (SPA) — A Bug Bounty Breakdown

The application accepted a user-supplied URL in an API parameter and fetched it server-side, allowing SSRF to internal services. The same parameter was also vulnerable to server-side template injection, which an attacker could use to run commands and read files.

jabaribrown62 Follow

Published on medium.com

I recently dove into a lab challenge that looked pretty quiet on the surface — but with some methodical digging, a little Burp Suite, and a lot of trial and error, I uncovered an SSRF vulnerability that led straight to the flag.

Jabaribrown, 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 backend passed user-controlled input into a URL fetcher and a template engine without validation or sandboxing.

Impact

An attacker could use the server to reach internal services and execute commands, potentially reading sensitive files such as the flag.

What the attacker needed

Access to the web application; ability to send crafted POST requests

How it was found

  1. Visit the homepage and observe that the SPA makes no obvious requests in the browser.
  2. Use Burp Suite to capture a background POST request to the backend API.
  3. Send the request to Repeater and note that the response contains URL-encoded data about truck IDs.
  4. Change the truck ID value and confirm the response changes.
  5. Replace the API parameter with a localhost URL to test for SSRF and observe an error response.
  6. Use ffuf to enumerate localhost ports and find port 3306 open.

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 server-side request forgery (SSRF) bug lets an attacker make the server send requests to places the attacker cannot reach directly, such as internal services. Here the server also evaluated template code supplied by the user, which let the attacker run system commands and read a file.

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 jabaribrown62

View all

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