We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 934bebd commit ce50d9bCopy full SHA for ce50d9b
1 file changed
backend/open_webui/routers/images.py
@@ -16,6 +16,7 @@
16
17
from open_webui.config import CACHE_DIR
18
from open_webui.constants import ERROR_MESSAGES
19
+from open_webui.retrieval.web.utils import validate_url
20
from open_webui.env import ENABLE_FORWARD_USER_INFO_HEADERS
21
22
from open_webui.models.chats import Chats
@@ -881,6 +882,8 @@ async def load_url_image(data):
881
882
return data
883
884
if data.startswith("http://") or data.startswith("https://"):
885
+ # Validate URL to prevent SSRF attacks against local/private networks
886
+ validate_url(data)
887
r = await asyncio.to_thread(requests.get, data)
888
r.raise_for_status()
889
0 commit comments