1 What is SSRF?
Server-Side Request Forgery (SSRF) occurs when an attacker can cause the server to make HTTP requests to arbitrary URLs. Because these requests originate from the server, they can reach internal services not exposed to the internet.
# VULNERABLE — fetches URL supplied by user
url = request.form['image_url']
response = requests.get(url) # Attacker sends: http://169.254.169.254/latest/meta-data/
On AWS, Azure, and GCP, the metadata endpoint (169.254.169.254) returns instance credentials, IAM roles, and startup scripts — all without any authentication. SSRF against cloud metadata can lead to full account takeover.