CVE-2026-87995: Open WebUI: Same-origin XSS to account takeover via terminal port-preview iframe hardcoding allow-same-origin
Any authenticated user with access to a shared terminal server could get script of their choosing to run in the Open WebUI origin itself.
What it is
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.
How to check
- Affected: open-webui (pip) >= 0.8.11, <= 0.11.0.
- Compare your installed version with the range above (command below).
How to fix
- Upgrade open-webui to 0.11.1 or later.
pip show open-webui | grep Version