Server-Side Request Forgery (SSRF)
Server-side request forgery (SSRF) is a flaw that lets an attacker make a web application send requests on their behalf, often to internal systems or cloud metadata services the attacker couldn't reach directly.
Also called: SSRF, SSRF attack
What is server-side request forgery?
Many web apps fetch things from other addresses: a preview of a link, an image from a URL, a webhook, a PDF generator. If the app lets the user choose the address without proper checks, an attacker can point it at places only the server can reach, such as internal admin pages, databases or the cloud provider's metadata service. The server makes the request because it trusts itself. The 2025 OWASP Top 10 groups SSRF under broken access control.
Why SSRF is dangerous in the cloud
Cloud servers can query a local metadata service for details about themselves, sometimes including temporary access keys. An SSRF flaw that reaches that service can hand an attacker credentials for the cloud account, turning a small web bug into a major breach.
How to prevent SSRF
OWASP's guidance includes:
- Only allow requests to an approved list of domains or addresses, rather than trying to block bad ones.
- Block requests to internal, private and link-local addresses, and resolve and check the address before connecting.
- Don't return raw responses from fetched URLs to the user.
- In AWS, require IMDSv2 for the metadata service; use equivalent protections in other clouds.
- Restrict the server's outbound network access and give it only the cloud permissions it needs.
Related terms
Sources
- Server-Side Request Forgery Prevention Cheat Sheet (OWASP)
- OWASP Top 10:2025 (OWASP Foundation)
Drafted with AI assistance, then edited and fact-checked by a person. How we use AI.
