Executive brief
Open WebUI, a user interface for interacting with large language models, contains a security flaw in how it previews files from terminal servers. An authenticated attacker can create a malicious file that, when automatically previewed by another user, executes code in that user's browser. This allows the attacker to steal the victim's session token and take over their account, potentially leading to full control over the server if the victim is an administrator.
Technical details
A Cross-Site Scripting (XSS) vulnerability exists in Open WebUI's `FilePreview.svelte` component when rendering files served via the `serveUrl` path. The application uses an iframe to preview terminal-served files but hardcodes the `allow-same-origin` attribute in the sandbox configuration. Because these files are served from the application's own origin (`/api/v1/terminals/{id}/files/serve/...`) and lack a restrictive Content-Security-Policy (CSP) by default, the sandbox provides no isolation. An authenticated attacker with access to a terminal server can upload a malicious HTML file and trigger a `display_file` tool call; when the victim views the chat, the script executes in the application's origin, allowing it to access `localStorage` and exfiltrate session tokens. This is fixed in version 0.11.0 by making `allow-same-origin` an opt-in setting.
Affected products
- Open WebUI open-webui >= 0.9.0, <= 0.10.2
Timeline
- 2026-08-02: disclosed
- 2026-08-02: patched: Fixed in version 0.11.0
- 2026-08-04: advisory