Security · interactive
SSRF: server-side request forgery
Your app shows previews of links, so your server fetches any URL a user pastes. That server sits inside your network and can reach things the attacker can't. Paste these URLs and see what comes back.
https://example.com/post
A normal page · 93.184.216.34fetched
http://169.254.169.254/latest/meta-data/iam/
Cloud metadata: temporary AWS keys · 169.254.169.254blocked
http://localhost:6379/
Internal Redis · 127.0.0.1blocked
http://2852039166/latest/meta-data/
Metadata IP written as one decimal number · 169.254.169.254fetched: internal data leaked
https://evil.example/r
Public URL that redirects to an internal admin panel · 203.0.113.9 → 302 → 10.0.0.5fetched: internal data leaked
String matching stops the obvious ones, but the same IP written as a number, or a redirect, gets through: 2 leaks.
Defence
Step 2 of 4 · read left to right
In production
Tools and technologies
Cloud metadata endpoints make SSRF especially dangerous.
Not tied to one language — use these names when you search docs or design a system.