Closing the SSRF DNS-Rebinding Hole with a Custom Resolver
An up-front hostname check doesn't stop SSRF — the host re-resolves to an internal IP at connect time. Here's the TOCTOU fix that actually closes it.
🎯 Vulnerability: Server-Side Request Forgery (SSRF)
💡 Defense Fix: Enforce URL whitelisting, block private IP ranges (10.0.0.0/8, 169.254.169.254), and mandate AWS IMDSv2 headers.