open-webui/backend/open_webui/retrieval/web
Classic298 0753409e7b
fix: use ipaddress stdlib for IPv6 SSRF protection (#23453)
The validators.ipv6(ip, private=True) call always returns a falsy ValidationError because validators==0.35.0 does not support the private kwarg for IPv6. This means any hostname resolving to a private IPv6 address (::1, fd00::*, ::ffff:169.254.169.254) bypasses SSRF protection entirely, circumventing the fix for CVE-2025-65958.

Replace both the IPv4 and IPv6 validators-based private checks with Python's stdlib ipaddress module using an allowlist approach (not addr.is_global). This blocks all non-globally-routable addresses — private, loopback, link-local, reserved, multicast, and unspecified — for both IPv4 and IPv6, including IPv4-mapped IPv6 addresses.
2026-04-12 16:34:13 -05:00
..
testdata [DATALAD RUNCMD] run codespell throughout fixing few left typos automagically 2025-01-03 15:07:21 -05:00
azure.py refac 2026-03-17 17:58:01 -05:00
bing.py refac 2026-03-17 17:58:01 -05:00
bocha.py refac 2026-03-17 17:58:01 -05:00
brave.py refac 2026-03-17 17:58:01 -05:00
duckduckgo.py refac 2026-03-17 17:58:01 -05:00
exa.py refac 2026-03-17 17:58:01 -05:00
external.py refac 2026-03-17 17:58:01 -05:00
firecrawl.py refac 2026-03-17 17:58:01 -05:00
google_pse.py refac 2026-03-17 17:58:01 -05:00
jina_search.py refac 2026-03-17 17:58:01 -05:00
kagi.py refac 2026-03-17 17:58:01 -05:00
main.py refac 2026-03-17 17:58:01 -05:00
mojeek.py refac 2026-03-17 17:58:01 -05:00
ollama.py refac 2026-03-17 17:58:01 -05:00
perplexity.py refac 2026-03-17 17:58:01 -05:00
perplexity_search.py refac 2026-03-17 17:58:01 -05:00
searchapi.py refac 2026-03-17 17:58:01 -05:00
searxng.py refac 2026-03-17 17:58:01 -05:00
serpapi.py refac 2026-03-17 17:58:01 -05:00
serper.py FIX: serper.dev API - Change snippet key from 'description' to 'snippet' (#22869) 2026-03-20 18:54:16 -05:00
serply.py refac 2026-03-17 17:58:01 -05:00
serpstack.py refac 2026-03-17 17:58:01 -05:00
sougou.py refac 2026-03-17 17:58:01 -05:00
tavily.py refac 2026-03-17 17:58:01 -05:00
utils.py fix: use ipaddress stdlib for IPv6 SSRF protection (#23453) 2026-04-12 16:34:13 -05:00
yacy.py refac 2026-03-17 17:58:01 -05:00
yandex.py refac 2026-03-17 17:58:01 -05:00
ydc.py refac 2026-03-17 17:58:01 -05:00