SSRF is proven when a parameter that names a URL makes your server fetch an internal address and returns something from it. A fix is verified only against redirects, DNS rebinding and alternate encodings, because a string blocklist on the hostname fails all three.
Where this class of bug actually lives in any feature that fetches a URL
- Webhooks and imports. "URL to import", "webhook endpoint", "avatar from URL", PDF renderers and image proxies.
- Cloud metadata.
169.254.169.254on AWS, GCP and Azure, plusmetadata.google.internal. - Internal services.
localhost,127.0.0.1, RFC1918 ranges, and the service mesh names that resolve inside the cluster. - Redirect chains. A URL on your own allowlisted domain that 302s to
169.254.169.254.
What to try first
- Point each URL-accepting field at a host you control and watch your access log for the request — that confirms the fetch is server-side and unfiltered.
- Try
http://169.254.169.254/latest/meta-data/, then the decimal and octal encodings of the same address. - Host a redirect on your domain that 302s to the metadata address and submit the allowlisted URL.
- Set a DNS record that resolves to 127.0.0.1 first and a public address on the second lookup, to test rebinding.
A reproduction you can keep
Confirm the fetch first, then walk the bypass ladder:
# 1. does the server fetch at all? watch your own log for this hit
curl -sS -X POST https://staging.example.com/api/import \
-H 'Authorization: Bearer ***' -H 'Content-Type: application/json' \
-d '{"url":"https://your-canary.example/x"}'
# 2. metadata, plain
-d '{"url":"http://169.254.169.254/latest/meta-data/iam/security-credentials/"}'
# 3. decimal-encoded 169.254.169.254
-d '{"url":"http://2852039166/latest/meta-data/"}'
# 4. redirect on an allowlisted host that 302s to the metadata address
-d '{"url":"https://cdn.yourapp.com/r"}'
# vulnerable: any of 2-4 returns metadata or an internal page
# fixed: the fetch is refused after resolution, and the redirect is not followedWhat "fixed" has to look like
Resolve the hostname, check the resolved IP against a deny set that covers loopback, link-local, RFC1918 and metadata, then pin that IP for the actual connection and refuse redirects to a different address. Verify all four requests above, plus one that resolves differently on the second lookup.
Where people get this wrong
- Blocklisting by hostname string fails to decimal, octal and IPv6 encodings of the same address.
- Following redirects after the check lets the target move the request somewhere else.
- A check at request time and a fetch at connection time are two DNS resolutions. Rebinding lives in the gap.
What Offense does here
Offense runs an agent swarm against your app in a disposable sandbox, keeps the request, the identity and the vulnerable response as evidence, and replays the same attack after the fix so the retest is a control comparison rather than a green check. It does not read your source and it does not patch your code: the finding goes to your coding agent with the reproduction attached. The hosted workspace is invite-only — join the waitlist — and the free dependency audit in /install needs no account.
Questions this page answers
What is the minimum viable SSRF fix?
Resolve first, validate the resolved address, connect to that exact address, and do not follow redirects. Anything less is bypassable.
Is SSRF still worth testing if the response is not returned to me?
Yes. Blind SSRF still reaches internal services and metadata, and the timing and error differences usually confirm it.
Written by Offense Research, reviewed December 2, 2026. Correct something? Email imran@offenseresearch.com.