Skip to content
BENIBIX Learn

Server-Side Request Forgery (SSRF)

Development🔐 SecurityAttacks

Also known as SSRF, SSRF Attack

Making a server fetch a link of the attacker's choice. Often it is a private one.

Think of it like

Think of it like a guard who fetches things from rooms you cannot go in.

Example

An app makes a preview of any link. An attacker pastes a private address from inside the company, and the preview shows an admin page.

Why it matters

Cloud servers can often reach secret keys through inside addresses. SSRF can hand those keys to a stranger.

Definition

SSRF tricks a server into making a web request for the attacker. The app fetches a link the user gives, say to show a preview. The attacker gives a link to an inside address instead. The server can reach places the attacker cannot, like private admin pages or cloud settings. So the reply leaks secrets. The fix is to fetch only from a fixed list of places.
The top row: the link points inside, so the server fetches its own private page.

Common mistake

Blocking a few bad addresses by name. Attackers find other ways to write them, so allow only safe places you know.

Key takeaways

  1. 1
    The server fetches. The attacker borrows its reach.
  2. 2
    Inside addresses. Private pages become reachable.
  3. 3
    An allow list. Fetch only from known places.

Compare