For HTTPS, _make_ssrf_safe_request in backend/onyx/utils/url.py validates one DNS resolution but then requests the original URL because TLS SNI needs the hostname, so the client resolves again and a rebinding DNS server can route the actual request to a private address. The code comments acknowledge the window. Affects every ssrf_safe_get caller (open_url, JWT key fetch from #14153, etc). Proper fix: pin the validated IP with a custom transport adapter that sets server_hostname/SNI explicitly. Surfaced by Greptile review on #14153.
For HTTPS, _make_ssrf_safe_request in backend/onyx/utils/url.py validates one DNS resolution but then requests the original URL because TLS SNI needs the hostname, so the client resolves again and a rebinding DNS server can route the actual request to a private address. The code comments acknowledge the window. Affects every ssrf_safe_get caller (open_url, JWT key fetch from #14153, etc). Proper fix: pin the validated IP with a custom transport adapter that sets server_hostname/SNI explicitly. Surfaced by Greptile review on #14153.