mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-20 00:11:27 +00:00
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> |
||
|---|---|---|
| .. | ||
| azure.py | ||
| bing.py | ||
| bocha.py | ||
| brave.py | ||
| brave_llm_context.py | ||
| duckduckgo.py | ||
| exa.py | ||
| external.py | ||
| firecrawl.py | ||
| google_pse.py | ||
| jina_search.py | ||
| kagi.py | ||
| linkup.py | ||
| main.py | ||
| mojeek.py | ||
| ollama.py | ||
| perplexity.py | ||
| perplexity_search.py | ||
| searchapi.py | ||
| searxng.py | ||
| serpapi.py | ||
| serper.py | ||
| serply.py | ||
| serpstack.py | ||
| sougou.py | ||
| tavily.py | ||
| utils.py | ||
| yacy.py | ||
| yandex.py | ||
| ydc.py | ||