AgentbeamBeta
AI agent vulnerability · Open WebUI

CVE-2026-54018: Open WebUI: SSRF Protection Bypass in Playwright Web Loader via HTTP Redirects

highCVSS 3.1 7.7GHSA-jrfp-m64g-pcwv

Open WebUI 0.9.5 and earlier can be tricked into fetching internal addresses through its Playwright web loader. The SSRF check looks only at the first URL, so a public page that redirects to localhost or a cloud metadata address gets through. Upgrade open-webui to 0.9.6.

Published Jun 17, 2026 · Updated Jul 20, 2026 · Analysis Nov 23, 2026

What an attacker can do

SafePlaywrightURLLoader validates each user-supplied URL with _safe_process_url_sync(), which resolves the host and rejects private IP addresses. It then calls page.goto(url). Playwright follows 301 and 302 redirects by default, and nothing checks the redirect target. An attacker hosts a page that answers with a redirect to an internal address, and the headless browser follows it.

The setting ENABLE_RAG_LOCAL_WEB_FETCH=False, which is the default and is meant to block local fetches, does not stop this. The loader is used only when RAG_WEB_LOADER_ENGINE is set to playwright. The attacker needs a low-privilege account that can use the Web Search or URL loader feature, and the CVSS scope is changed because the request reaches other systems.

The reported proof of concept redirects to the Open WebUI container's own version endpoint by service name. The advisory lists the real targets: the cloud instance metadata service to steal credentials, unauthenticated internal tools on a company network, and other containers on the same Docker network. The page content comes back as loaded text, so the attacker can read it.

Who is affected

open-webui up to and including 0.9.5, only when RAG_WEB_LOADER_ENGINE=playwright. Deployments using another web loader engine are not described as affected. Check the installed version and your loader setting:

pip show open-webui

For Docker, look at the image tag, and check the environment for RAG_WEB_LOADER_ENGINE.

open-webui

Ecosystem
PyPI
Affected
<= 0.9.5
Fixed in
0.9.6
Check
pip show open-webui

How to fix it

Upgrade open-webui to 0.9.6 or later:

pip install --upgrade open-webui

The advisory lists no workaround and notes that ENABLE_RAG_LOCAL_WEB_FETCH=False does not prevent the bypass. Its recommended patch validates every request, including redirects, with Playwright's page.route in both lazy_load and alazy_load. Until you upgrade, you can switch off the playwright loader engine and block the container's access to the metadata address at the network layer; those two steps are general precautions, not from the advisory.

How to tell if you were hit

Review outbound requests made by the Open WebUI host or container. Look for connections to 169.254.169.254, localhost, or other containers' ports at the moment a user ran a web search or URL load. Check web server logs of any attacker-controlled sites for fetches from your server, followed by a redirect response. Look for users who submitted URLs to unfamiliar public hosts. Cloud audit logs showing use of instance role credentials from unexpected places are another sign.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

The SafePlaywrightURLLoader implements a validate_url function to prevent SSRF attacks by checking the IP address of the user-provided URL. However, this validation is performed only on the initial URL.

Since Playwright automatically follows HTTP redirects (301/302) by default, an attacker can bypass the validation by providing a safe URL that redirects to a restricted internal network address (e.g., localhost, Docker container network, or Cloud Metadata).

This allows the application to access internal services despite ENABLE_RAG_LOCAL_WEB_FETCH being set to False

Details

Root Cause

The application validates the initial user-provided URL using self._safe_process_url_sync(url). This correctly resolves the domain and ensures it does not point to a private IP.

The application then calls page.goto(url). By default, Playwright automatically follows HTTP redirects (301/302).

The Bypass: If the destination server returns a redirect to an internal IP (e.g., 127.0.0.1 or 169.254.169.254), the browser follows it without re-validating the new destination. The initial validation is bypassed because it only checked the first URL, not the entire redirect chain.

for url in self.urls:
    try:
        self._safe_process_url_sync(url)  
        page = browser.new_page()
        response = page.goto(url, timeout=self.playwright_timeout)  #this
        if response is None:
            raise ValueError(...)
        text = self.evaluator.evaluate(page, browser, response)

PoC

(This PoC uses Docker to easily demonstrate internal network access (accessing a container by service name). However, the vulnerability is NOT tied to Docker.)

  1. Ensure the Open WebUI is configured with the following environment variables. The vulnerability is specific to the Playwright engine.
  2. ENABLE_RAG_LOCAL_WEB_FETCH=False (Default)
  3. RAG_WEB_LOADER_ENGINE=playwright
  4. Setup and run attack server
  5. In Open WebUI, use the "Web Search" or "URL Loader" feature.
  6. Input the attacker's URL (e.g., http://attacker-ip/).
# attack_server.py
from flask import Flask, redirect
app = Flask(__name__)

@app.route('/')
def attack():
    # Redirect to the Open WebUI container's internal port
    return redirect("http://open-webui:8080/api/version", code=302)

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=80)

The Playwright browser follows the redirect to the internal address (http://open-webui:8080/api/version)

Impact

  • Cloud Environments: Access to Instance Metadata Service (IMDS) to steal cloud credentials.
  • Intranet/On-Premise: Scanning internal networks and accessing unauthenticated internal tools.
  • Container Environments: Accessing other containers within the same network.

Recommended Patch

implement a request interceptor using Playwright's page.route. This ensures all requests, including redirects, are validated before connection.

apply the following logic to both lazy_load and alazy_load methods:

# async context
async def intercept_route(route):
    try:
        await run_in_threadpool(validate_url, route.request.url)
        await route.continue_()
    except Exception:
        await route.abort()

await page.route("**/*", intercept_route)
response = await page.goto(url, timeout=self.playwright_timeout)

Credited to POV9en, Classic298.

Questions

Does ENABLE_RAG_LOCAL_WEB_FETCH=False protect me from CVE-2026-54018?

No. The advisory states the bypass works even with that setting at its default of False, because the check runs only on the first URL and the browser follows redirects afterward.

Am I affected if I do not use the Playwright loader?

The advisory says the flaw is specific to the Playwright engine, set with RAG_WEB_LOADER_ENGINE=playwright. Other engines are not described as affected, but you should still upgrade to 0.9.6.

What can an attacker reach with this?

Anything the Open WebUI server can reach: cloud metadata services that hold credentials, internal tools without authentication, and other containers on the same network.

References

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 entries