CVE & 0-Day··6 min read·By Veer Bhanushali
Defeating SSRF allowlists via IPv6-mapped IPv4 addresses and DNS rebinding
String-based host blocklists fail against ::ffff:127.0.0.1, decimal IP notation, trailing dots, and 302 redirects into cloud metadata endpoints.
Key takeaway
Resolve DNS once, normalize mapped IPv6 to IPv4, block RFC1918 and link-local CIDRs on the resolved socket IP, and disable auto-redirects.
Validate the resolved socket address, not the URL string
Checking url.hostname === '127.0.0.1' fails trivially against 0.0.0.0, [::ffff:169.254.169.254], or HTTP 307 redirects returned from an external host you allowed.