Web security

Server-Side Request Forgery (SSRF) Explained for Beginners

Server-side request forgery (SSRF) tricks a server into making web requests on the attacker's behalf. Because the server sits inside the network, it can often reach things the attacker cannot: internal admin panels, databases and cloud metadata services. It is counted under broken access control in the OWASP Top 10:2025 and has its own entry in the API Top 10.

How It Works

Many features ask the server to fetch a URL: importing a profile picture from a link, generating a link preview, sending a webhook, converting a web page to PDF. If the server fetches whatever URL it is given, an attacker can point it at an internal address instead.

Why the Cloud Makes It Worse

Cloud servers can query a special internal metadata address to learn about themselves, and in some configurations to obtain temporary credentials. An SSRF that reaches that address can leak keys that unlock the wider cloud account. Cloud providers have added protections, such as requiring a token for metadata requests, but they only help when they are turned on.

Where It Hides

  • Fields that accept a URL or a host name
  • File imports by link, and document or image converters
  • Webhooks and integrations
  • XML parsers that resolve external entities
  • Headers some servers use to build requests

Blind SSRF

Often the server makes the request but does not show the response. Testers then confirm the flaw by pointing it at a server they control and watching for the incoming request, in authorized tests only.

How Developers Prevent It

  • Allow only the specific destinations a feature needs, rather than trying to block bad ones
  • Resolve the host name and reject internal, loopback and link-local addresses, then connect to the checked address
  • Do not follow redirects blindly
  • Turn on the cloud provider's metadata protections
  • Segment the network so the application server cannot reach what it does not need
  • Do not return raw fetched responses to users

SSRF often appears alongside other API flaws; see the OWASP API Security Top 10. The OWASP Top 10 explained covers where it sits in the 2025 web list.

Learning Web and API Testing

SSRF is part of the web-to-API attack chains in our Application Security course, tested in authorized labs with Burp Suite.

Want to learn web testing step by step? Book free trial classes. Contact us or call +91 86868 92922.

Start Your Cyber Security Career

Talk to a counselor, choose the right course for your goals, and get the fee, syllabus and next batch dates in writing.

Book Free Trial Classes

By submitting, you agree that Hacking Trainer Academy may contact you about courses by phone, WhatsApp or email. See our privacy notice and refund policy.

WhatsApp