Files
open-webui/backend/open_webui
Classic298andClaude Opus 4.6 854440f703 fix: mitigate DNS rebinding in web loader fetch paths (#24759)
validate_url() resolves DNS to check IPs but discards the result; the
HTTP client resolves again independently.  Between those two lookups an
attacker can swap the DNS record from a public IP to an internal one
(DNS rebinding).

Push the IP-is-global check into the actual connection layer so the
validated resolution is the one used for the TCP connect:

- aiohttp (_fetch): _SSRFSafeResolver wraps DefaultResolver and rejects
  non-global IPs at resolve time (zero TOCTOU window).
- requests (_scrape): _SSRFSafeAdapter mounts custom urllib3 connection
  classes whose _new_conn resolves, validates, and connects to the
  validated IP in one shot (zero TOCTOU window).

Both paths respect ENABLE_RAG_LOCAL_WEB_FETCH (skip validation when on).

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-19 23:57:12 +04:00
..
…
2026-05-19 21:54:38 +04:00
2026-05-13 12:44:12 +09:00
2026-05-12 03:04:35 +09:00
2026-05-19 22:25:39 +04:00
2026-05-09 02:38:08 +09:00
2026-05-19 21:54:38 +04:00
2026-05-14 02:56:44 +09:00
2026-05-19 21:54:38 +04:00