CVE-2026-70486: Open WebUI: iframe sandbox bypass = account takeover
GHSA-3xpf-xq7r-v8c5 HIGH PoC AVAILABLEA flaw in Open WebUI's file preview lets any authenticated user with terminal-server access run arbitrary JavaScript in the application's own origin, because the iframe sandbox for terminal-served HTML files always kept `allow-same-origin` alongside `allow-scripts`, nullifying the isolation the sandbox was supposed to provide. That script can read the victim's session token straight out of localStorage with zero clicks — the preview opens automatically on a `display_file` tool call — handing the attacker full account takeover, and server-side code execution via Functions if the victim is an admin or holds `workspace.functions`. A public PoC exists and CVSS is 8.2, but real-world exposure is narrower than the score suggests: it only affects the 4 downstream dependents running with `TERMINAL_SERVER_CONNECTIONS` configured (empty by default), CISA's SSVC decision is the lowest tier (TRACK), it's not in KEV, and EPSS exploitation probability remains low. Patch to Open WebUI 0.11.0 (fixed in 65a5fad7b / PR #26907) — no configuration change required — and in the interim, disable terminal server connections or lock down `TERMINAL_PROXY_HEADERS` with a restrictive CSP, since operators who had already done so were not exposed.
What is the risk?
CVSS 8.2 (AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:N) reflects a scope-changing break-out of the preview iframe into the parent application origin with high confidentiality and integrity impact and no availability impact. Attack complexity is genuinely high: exploitation requires an admin to have configured a terminal server (off by default), the attacker to hold a low-privilege authenticated account with reach to that server, and a malicious HTML file to actually get written and surfaced via `display_file` (via prompt injection or a social-engineering step). Once those preconditions are met, no victim interaction is needed — the preview opens automatically and the token theft is silent. Public PoC code exists, but low EPSS, TRACK-level SSVC, and absence from CISA KEV all indicate this is not being mass-exploited in the wild; the realistic risk is targeted, opportunistic abuse within organizations that already expose terminal server access to non-admin users.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| Open WebUI | pip | >= 0.9.0, <= 0.10.2 | 0.11.0 |
Do you use Open WebUI? You're affected.
How severe is it?
What is the attack surface?
What should I do?
1 step-
1) Upgrade to Open WebUI 0.11.0 — the fix gates
allow-same-originbehind the existingiframeSandboxAllowSameOriginsetting for theserveUrlpreview branch, and requires no config change. 2) If immediate patching isn't possible, disableTERMINAL_SERVER_CONNECTIONSentirely, or set restrictive Content-Security-Policy headers viaTERMINAL_PROXY_HEADERS(confirmed effective as a compensating control per the advisory). 3) Audit which non-admin accounts currently have terminal server access and reduce that population to trusted users only. 4) For detection: review logs fordisplay_filetool-call events referencing HTML files served via/api/v1/terminals/{id}/files/serve/..., and monitor for anomalous outbound requests immediately following chat sessions (indicative of token exfiltration). 5) Rotate session tokens for any admin orworkspace.functions-privileged accounts that used terminal server features before patching.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-70486?
A flaw in Open WebUI's file preview lets any authenticated user with terminal-server access run arbitrary JavaScript in the application's own origin, because the iframe sandbox for terminal-served HTML files always kept `allow-same-origin` alongside `allow-scripts`, nullifying the isolation the sandbox was supposed to provide. That script can read the victim's session token straight out of localStorage with zero clicks — the preview opens automatically on a `display_file` tool call — handing the attacker full account takeover, and server-side code execution via Functions if the victim is an admin or holds `workspace.functions`. A public PoC exists and CVSS is 8.2, but real-world exposure is narrower than the score suggests: it only affects the 4 downstream dependents running with `TERMINAL_SERVER_CONNECTIONS` configured (empty by default), CISA's SSVC decision is the lowest tier (TRACK), it's not in KEV, and EPSS exploitation probability remains low. Patch to Open WebUI 0.11.0 (fixed in 65a5fad7b / PR #26907) — no configuration change required — and in the interim, disable terminal server connections or lock down `TERMINAL_PROXY_HEADERS` with a restrictive CSP, since operators who had already done so were not exposed.
Is CVE-2026-70486 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2026-70486, increasing the risk of exploitation.
How to fix CVE-2026-70486?
1) Upgrade to Open WebUI 0.11.0 — the fix gates `allow-same-origin` behind the existing `iframeSandboxAllowSameOrigin` setting for the `serveUrl` preview branch, and requires no config change. 2) If immediate patching isn't possible, disable `TERMINAL_SERVER_CONNECTIONS` entirely, or set restrictive Content-Security-Policy headers via `TERMINAL_PROXY_HEADERS` (confirmed effective as a compensating control per the advisory). 3) Audit which non-admin accounts currently have terminal server access and reduce that population to trusted users only. 4) For detection: review logs for `display_file` tool-call events referencing HTML files served via `/api/v1/terminals/{id}/files/serve/...`, and monitor for anomalous outbound requests immediately following chat sessions (indicative of token exfiltration). 5) Rotate session tokens for any admin or `workspace.functions`-privileged accounts that used terminal server features before patching.
What systems are affected by CVE-2026-70486?
This vulnerability affects the following AI/ML architecture patterns: agent frameworks, LLM chat interfaces, tool invocation pipelines.
What is the CVSS score for CVE-2026-70486?
CVE-2026-70486 has a CVSS v3.1 base score of 8.2 (HIGH). The EPSS exploitation probability is 0.31%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0051 LLM Prompt Injection AML.T0053 AI Agent Tool Invocation AML.T0055 Unsecured Credentials AML.T0091.000 Application Access Token Compliance Controls Affected
What are the technical details?
Original Advisory
## Summary Any authenticated user with access to a terminal server could get script of their choosing to run in the Open WebUI origin itself. The HTML file preview rendered terminal-served files in an iframe whose sandbox always granted `allow-same-origin` alongside `allow-scripts`, and the file is served from a path on the application's own origin, so the sandbox provided no isolation at all. Script in a previewed file 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 the victim. Deployments with no terminal server configured are not affected. - The attacker needs a normal authenticated account with access to that terminal server, no admin rights. - No victim interaction beyond having the chat open: a `display_file` tool call opens the preview automatically. - `TERMINAL_PROXY_HEADERS` unset, which is the default. An operator who had already set a restrictive Content-Security-Policy through it was not exposed, since those headers are merged into every proxied response including the served file. - The `iframeSandboxAllowSameOrigin` user setting is off by default, but the affected branch ignored it entirely. ## Impact The previewed document 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. Getting the malicious file written and displayed still requires a prompt-injection or a social step, which is what keeps the complexity high rather than trivial. Instances with no terminal server configured were never affected, and neither was the `srcdoc` preview path. ## Fix Fixed in 0.11.0 by 65a5fad7b (#26907). The `serveUrl` preview branch now gates `allow-same-origin` behind the same `iframeSandboxAllowSameOrigin` setting the `srcdoc` branch already used, so by default the preview loads at an opaque origin and cannot reach the parent context. Upgrading is sufficient, no configuration change is required, and HTML previews continue to render normally. ## Root cause - `src/lib/components/chat/FileNav/FilePreview.svelte`, the `serveUrl` iframe branch, reached for HTML files served through `/api/v1/terminals/{id}/files/serve/...`. - Present from 0.9.0, where that branch was introduced, through 0.10.2. The component grew two preview paths. The `srcdoc` path was hardened: same-origin became opt-in and a CSP was injected into the document. The `serveUrl` path, added later for files streamed from a terminal server, kept a static sandbox string with `allow-same-origin` baked into it. Because the terminal proxy is mounted under the application's own origin and forwards the upstream response 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 Write an HTML file containing a script that reads `window.parent.localStorage.token` to a terminal server the victim can reach, then trigger `display_file` for that file. The chat handler opens the preview on the resulting `terminal:display_file` event with no click, the script executes at the application origin, and the token is exfiltrated. ## Credits Reported by @manus-use (researcher zx / Jace).
Exploitation Scenario
An attacker with a normal, non-admin Open WebUI account that has access to a configured terminal server writes an HTML file containing a script that reads `window.parent.localStorage.token` and beacons it to an attacker-controlled endpoint. The attacker gets this file displayed to a victim — either directly if they can trigger `display_file` themselves, or indirectly by using prompt injection to get the agent to call `display_file` on the malicious file during a victim's session. The chat handler opens the file preview automatically on the resulting `terminal:display_file` event, no click required. Because the file is served from the app's own origin and the iframe sandbox still grants `allow-same-origin`, the script executes with full access to the parent window, silently exfiltrating the victim's session token. The attacker replays the token to take over the account; if the victim is an admin or holds `workspace.functions`, the attacker pivots to server-side code execution through Functions.
Weaknesses (CWE)
CWE-1021 Improper Restriction of Rendered UI Layers or Frames
Primary
CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Primary
CWE-1021 Improper Restriction of Rendered UI Layers or Frames CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') CWE-1021 — Improper Restriction of Rendered UI Layers or Frames: The web application does not restrict or incorrectly restricts frame objects or UI layers that belong to another application or domain.
- [Implementation] The use of X-Frame-Options allows developers of web content to restrict the usage of their application within the form of overlays, frames, or iFrames. The developer can indicate from which domains can frame the content. The concept of X-Frame-Options is well documented, but implementation of this protection mechanism is in development to cover gaps. There is a need for allowing frames from multiple domains.
- [Implementation] A developer can use a "frame-breaker" script in each page that should not be framed. This is very helpful for legacy browsers that do not support X-Frame-Options security feature previously mentioned. It is also important to note that this tactic has been circumvented or bypassed. Improper usage of frames can persist in the web application through nested frames. The "frame-breaking" script does not intuitively account for multiple nested frames that can be presented to the user.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:N References
Timeline
Related Vulnerabilities
CVE-2026-44551 9.1 open-webui: LDAP auth bypass — full account takeover
Same package: open-webui CVE-2026-45672 8.8 open-webui: code exec gate bypass via API endpoint
Same package: open-webui CVE-2026-44552 8.7 open-webui: Redis cache poisoning enables cross-instance tool hijack
Same package: open-webui CVE-2025-64495 8.7 Open WebUI: XSS-to-RCE via malicious prompt injection
Same package: open-webui CVE-2026-45315 8.7 open-webui: stored XSS → JWT theft and admin takeover
Same package: open-webui