Identifying SSRF
Start by looking for any parameter, header, or file upload that causes the server to make an outbound request on your behalf, URL fetchers, PDF/image renderers, webhook/callback URLs, “import from URL” features, link previews, e.g. To confirm it, point the parameter at yourself first:URL Schemes
If the application accepts a user supplied URL scheme rather than assuminghttp(s)://, the attack surface grows:
| Scheme | Effect |
|---|---|
http:// / https:// | Standard HTTP/S request, used to reach internal endpoints, bypass WAFs, or hit cloud metadata services |
file:// | Reads a file from the local filesystem (Local File Inclusion via SSRF) |
gopher:// | Sends arbitrary raw bytes to a TCP socket, used to forge POST requests or speak to non-HTTP services (SMTP, Redis, MySQL, etc.) |
dict:// | Queries a dictionary-protocol server, useful for banner-grabbing and probing Redis/Memcached |
sftp:// | Secure file transfer, can be abused to probe for an open SFTP service |
tftp:// | Transfers data over UDP - sometimes slips past filters that only block TCP schemes |
ldap:// | Can be used to interact with LDAP services |
Local File Inclusion (file://)
Since the scheme is attacker-controlled, reading local files is often as simple as entering:
Bypassing Filters & Whitelists
Applications often try to block SSRF by blacklistinglocalhost/127.0.0.1 or whitelisting specific domains. Common bypasses:
- Alternate IP representations of localhost
- Open redirects: if the whitelist check only validates the first request, chain through a redirect you control (
http://allowed-domain.com/redirect?url=http://127.0.0.1/) to land on the real target.
Sending POST Requests via Gopher
Most basic SSRFs only let you issue GET requests. Thegopher:// scheme lets you send arbitrary bytes to a TCP socket, which means you can craft a HTTP request to reach endpoints that only accept POST.
Say the target endpoint expects:
%20 and newlines become %0D%0A. Prefix the encoded data with the scheme, target host, port, and an underscore:
Quick Reference Tools
Gopherus
Generates gopher payloads for MySQL, Redis, FastCGI, SMTP, and more.
SSRFmap
Automates SSRF exploitation (port scan, file read, cloud metadata, etc.) from a captured request.
PayloadsAllTheThings: SSRF
Large collection of localhost/whitelist bypass payloads.
HackTricks: SSRF
Broader bypass catalogue and protocol-smuggling tricks.
HackTricks: Cloud SSRF
Per-provider metadata endpoints and header requirements (AWS, GCP, Azure, etc.).
OWASP SSRF Prevention Cheat Sheet
Defensive reference, useful for understanding what mitigations you’re likely to run into.

