/

CVE-2026-70486

Severity:

HIGH RISK

(8.2)

Stored XSS (CWE-79) in Open WebUI Terminal Preview

CVE-2026-70486

Analyzed

Vulnerability type

Category:

Cross-Site Scripting

CWE:

CWE-79, CWE-1021

Impact:

Session token theft and account takeover, with possible server-side code execution through privileged victim accounts

Severity:

HIGH RISK

(8.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Open WebUI versions from 0.9.0 through before 0.11.0 contain a cross-site scripting weakness in the terminal file-preview iframe handling for HTML files. An authenticated user with access to a configured terminal server may cause previewed script to execute in the Open WebUI origin, potentially exposing session tokens and enabling account takeover.

Affected context

The issue occurs in Open WebUI terminal file previews when HTML content is served through the application origin and rendered in an iframe configured with both allow-same-origin and allow-scripts. Risk depends on the deployment's terminal-server configuration, the attacker's authenticated access to that server, and whether a victim views the crafted preview.

Exploit preconditions

  • Attack surface: Terminal file-preview functionality for HTML files
  • Required access: An authenticated user with access to a configured terminal server
  • Victim interaction: A privileged or otherwise authenticated user must open the affected preview
  • Trigger point: Rendering the HTML file in the terminal preview iframe
  • Why exploitation is possible: The iframe retains the Open WebUI origin while permitting scripts to run, allowing preview content to access origin-scoped browser data such as localStorage

Why this happens

The vulnerability results from an unsafe iframe isolation pattern. Granting both allow-same-origin and allow-scripts to HTML content served from the application origin allows active preview content to execute with the application's origin privileges. This maps primarily to CWE-79, Improper Neutralization of Input During Web Page Generation (Cross-site Scripting), and is also related to CWE-1021, Improper Restriction of Rendered UI Layers or Frames.

Potential impact

  • A malicious preview may execute JavaScript in the Open WebUI origin
  • An attacker may steal a victim's session token from localStorage
  • The victim's account may be taken over
  • A compromised administrator account could enable broader application or workspace abuse
  • Server-side code execution may be possible when the victim has privileged workspace functions or equivalent capabilities

General mitigation guidance

Mitigation generally focuses on isolating untrusted preview content from the application origin and reducing the authority of rendered files. Safer patterns include serving previews from a distinct, non-privileged origin; disabling script execution for untrusted documents; using restrictive iframe sandbox policies without unnecessary origin privileges; and applying context-appropriate content security policies. Session material should not be exposed to scripts through browser storage where avoidable, and terminal access and workspace capabilities should follow least-privilege principles.

How teams detect issues like this

Detection can include static and dynamic review of iframe construction, especially combinations of allow-same-origin and allow-scripts applied to user-controlled HTML. Code review should identify previews served from the application origin, browser-storage access by rendered content, and missing content isolation. Security testing can verify that previewed documents cannot access application cookies, localStorage, authenticated APIs, or privileged UI actions. Policy checks may require untrusted content to use a separate origin and prohibit active content in file previews.

Sources

SourceLink
github.comgithub.com/open-webui/open-webui/commit/65a5fad7b97db99d490d81f4e0860282c3a4543c
github.comgithub.com/open-webui/open-webui/pull/26907
github.comgithub.com/open-webui/open-webui/releases/tag/v0.11.0
github.comgithub.com/open-webui/open-webui/security/advisories/GHSA-3xpf-xq7r-v8c5

Frequently asked

questions

It can be exploitable through the Open WebUI application when an attacker has

authenticated access to a configured terminal server and a victim opens the

affected HTML preview. It is not necessarily an unauthenticated attack.

The attacker generally needs an authenticated account with access to the

relevant terminal server or file-preview capability. Impact also depends on

the victim's privileges and interaction with the preview.

Treat previewed HTML as untrusted active content: isolate it on a separate

origin, disable scripting where possible, and apply a restrictive iframe

sandbox policy that does not grant unnecessary origin privileges.

Review iframe permissions and origin boundaries, avoid exposing session

secrets to client-side storage when feasible, test previews with untrusted

content, and enforce least privilege for terminal and workspace functions.

Find out what's already
exploitable in your codebase.