SSRF occurs when an attacker can make the server send HTTP requests to arbitrary URLs. The server acts as a proxy, allowing attackers to:
localhost, internal IPs)file:// protocolThis form fetches content from any URL on the server side, and displays it inline. Image formats are displayed directly, everything else is displayed as text. The server makes the request, not your browser.
Why is this dangerous? The server can access resources you can't, like internal services and cloud metadata.
On AWS EC2 instances, try accessing instance metadata:
http://169.254.169.254/latest/meta-data/
This can reveal IAM credentials, instance info, and security groups.
Try accessing internal services:
http://localhost:8080 – Internal web servicehttp://192.168.1.1 – Router/gatewayhttp://127.0.0.1:6379 – Redis databasefile:// is allowed)file:///etc/passwd
May not work depending on PHP configuration (allow_url_include).
Vary the port number to scan internal services:
http://localhost:PORT
Response times and error messages reveal open/closed ports.
127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16 private address ranges from RFC 1918http:// and https://, and block file://, gopher://, etc.