Course contentsShow
← Security
Lesson 882 of 3,05218. Web Security - CSRF and Request ForgeryFree lesson

SSRF Fundamentals and Attack Surface

Understanding server-side request forgery mechanics, how applications make backend requests, and where SSRF vulnerabilities occur.

SSRF Fundamentals and Attack Surface

You'll learn: What server-side request forgery is, how it exploits backend request capabilities, and where SSRF vulnerabilities hide in applications.

What is SSRF?

Server-Side Request Forgery (SSRF) is a vulnerability that allows an attacker to trick a server into making HTTP requests on their behalf. Instead of attacking the application directly, you manipulate it into becoming your proxy—making requests to internal systems, cloud metadata services, or external targets that you couldn't reach yourself.

How It Works

Think of SSRF like convincing a hotel concierge to deliver a message anywhere you want. The concierge (server) has access to places you don't—employee break rooms, management offices, service areas. If you can control where the concierge goes and what they say, you've gained unauthorized access through a trusted intermediary.

Applications often fetch external resources: loading images from URLs, validating webhooks, importing data from APIs, or checking link previews. When user input influences the destination of these backend requests without proper validation, SSRF becomes possible.

Common Attack Surfaces

SSRF vulnerabilities appear wherever applications make outbound requests based on user-controlled data:

  • URL parameters: fetch?url=http://example.com
  • File uploads: PDF generators fetching remote images
  • Webhooks: Applications posting events to user-provided endpoints
  • API integrations: Import features pulling data from external services
  • XML parsers: External entity references (XXE leading to SSRF)

The danger isn't just fetching external sites—it's accessing internal resources like localhost, 127.0.0.1, private IP ranges (192.168.x.x, 10.x.x.x), or cloud metadata endpoints (169.254.169.254).

Key Takeaway: SSRF exploits an application's ability to make backend requests, turning the server into an attacker-controlled proxy to access internal systems, bypass firewalls, and reach resources that should be protected.