High

Open WebUI: Same-origin XSS to account takeover via terminal port-preview iframe hardcoding allow-same-origin

  • Disclosed: 10.09.2026
  • Updated: 11.10.2026 15:18

Summary

Any authenticated user with access to a shared terminal server could get script of their choosing to run in the Open WebUI origin itself. The in-app port preview rendered the content of a previewed port in an iframe whose sandbox always granted allow-same-origin alongside allow-scripts, and that content is served from a path on the application's own origin, so the sandbox provided no isolation at all. Script served on a previewed port could read the victim's session token and take over the account.

Preconditions

  • At least one terminal server configured by an admin (TERMINAL_SERVER_CONNECTIONS, empty by default) and reachable by both the attacker and the victim. Deployments with no terminal server configured are not affected.
  • The attacker needs a normal authenticated account with access to that terminal connection, no admin rights, plus the ability to start a process listening on a port there.
  • Personal terminals a user configures for themselves are not affected. Those carry an external URL, so the previewed document is cross-origin and the sandbox held.
  • The victim has to open the port list and click the attacker's port.
  • TERMINAL_PROXY_HEADERS unset and no CONTENT_SECURITY_POLICY set, which are the defaults. An operator who had already set a restrictive Content-Security-Policy through either was not exposed, since those headers apply to the proxied response.
  • The iframeSandboxAllowSameOrigin user setting is off by default, but the affected branch ignored it entirely.

Impact

The previewed page runs in the application origin, so it can reach the parent window, read the session token out of localStorage and exfiltrate it, which is full account takeover of the victim. If the victim is an admin, or any user holding workspace.functions, that takeover extends to server-side code execution through Functions. Serving the page costs the attacker nothing beyond the terminal access they already hold, so the only real barrier is getting the victim to open that port. Instances with no terminal server configured were never affected, and neither were personal terminals pointed at an external URL.

Fix

Fixed in 0.11.1 by 54d7a2237. The port preview now gates allow-same-origin behind a terminalPreviewAllowSameOrigin user setting that is off by default, so the preview loads at an opaque origin and cannot reach the parent context. Upgrading is sufficient and no configuration change is required. Previews of pages that need same-origin access still work if a user turns that setting on, and doing so re-enables the behaviour described here for that user.

Root cause

  • src/lib/components/chat/FileNav/PortPreview.svelte, the preview iframe, reached by clicking a port in the file navigator's port list.
  • Present from 0.8.11, the first release containing the component, through 0.11.0.

Every other iframe in the application had already been moved to an opt-in same-origin setting. The port preview kept a static sandbox string with allow-same-origin baked into it, and it was missed when the equivalent problem was fixed in the file preview for 0.11.0. Because the terminal proxy is mounted under the application's own origin and forwards the upstream response and its content type without adding a Content-Security-Policy of its own unless the operator configured one, and no global CSP is set, the sandbox was the only isolation boundary left, and it was granting precisely the permission that dissolved it.

Proof of concept

On a terminal server the victim can also reach, serve an HTML page containing a script that reads window.parent.localStorage.token and sends it to a host the attacker controls. The victim opens the file navigator, switches to the port list and clicks that port. The preview opens, the script executes at the application origin, and the token is exfiltrated.

Credits

Reported by @manus-use (researcher zx / Jace).

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Python (PyPI) open-webui >= 0.8.11, < 0.11.1 0.11.1

References

CVSS score 8.7/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
Weakness (CWE)
CWE-1021, CWE-79
Platform
Python (PyPI)
Package
open-webui
Disclosed
10.09.2026
Updated
11.10.2026 15:18

Sources and licenses

OSV / GitHub Advisory Database - PYSEC-2026-4123 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-jmc6-2wr8-h3wj - CC BY 4.0

Vulnerability history: open-webui

All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (161) in the archive
Total entries
161
First → latest
08.2024 09.2026
Without a fix
11
Exploited in attacks
0

Severity breakdown

  • Critical 1
  • High 77
  • Medium 75
  • Low 8

Disclosures per year

  1. 2024: 3
  2. 2025: 21
  3. 2026: 137
Severity:
  1. Open WebUI: Same-origin XSS to account takeover via terminal port-preview iframe hardcoding allow-same-origin this entry
    High · 8.7 CVE-2026-87995 >= 0.8.11, < 0.11.1 0.11.1
  2. High · 7.7 CVE-2026-59221 >= 0.9.6, < 0.10.0 0.10.0
  3. High · 7.3 CVE-2026-59214 < 0.10.0 0.10.0
  4. High · 8.7 CVE-2026-54011 < 0.9.6 0.9.6
  5. High · 7.1 CVE-2026-45349 < 0.9.0 0.9.0
  6. High · 7.7 CVE-2026-45303 < 0.6.5 0.6.5
  7. High · 7.1 CVE-2026-44569 < 0.6.19 0.6.19
  8. High · 8.1 CVE-2026-44565 < 0.6.10 0.6.10
  9. High · 7.3 CVE-2026-44566 < 0.1.124 0.1.124
  10. High · 7.3 CVE-2026-44567 < 0.1.124 0.1.124
  11. High · 7.3 CVE-2026-44549 < 0.8.0 0.8.0
  12. Critical · 9.1 CVE-2026-44551 < 0.9.0 0.9.0
  13. High · 7.3 CVE-2026-44721 < 0.9.0 0.9.0
Show more (18) Showing 60 of 78

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.