CVE-2026-70492: Open WebUI: KaTeX fallback XSS steals admin session
GHSA-pwxh-7358-jq2x HIGH PoC AVAILABLE CISA: TRACK*A stored cross-site scripting flaw lets any authenticated Open WebUI user craft a chat message that crashes KaTeX's math renderer with a stack overflow, causing the app to fall back to inserting the raw, attacker-controlled source as HTML instead of escaped text, so arbitrary script runs in the browser of anyone who opens the message. This matters because the payload survives in shared chats and channels — no admin rights or non-default configuration are needed, only that a victim opens the content — and the session token sits in reachable localStorage, meaning a viewing administrator's browser session can be fully hijacked with a single crafted message. A working PoC already exists and was demonstrated stealing an admin's token via a shared chat link, and this CVE sits in the top 18% of EPSS-scored vulnerabilities by exploitation likelihood, though it is not yet in CISA KEV and CISA's own triage rates it TRACK_STAR rather than immediate action. Open-webui is a widely deployed self-hosted LLM chat UI (150 other CVEs recorded against the package, package risk score 38/100), so exposure scales with however many internal or customer-facing deployments exist. Patch to 0.11.0 immediately — the fix HTML-escapes the KaTeX error fallback — and in the meantime treat shared chat links and channel messages from any authenticated user as untrusted, since no workaround short of upgrading closes the gap.
What is the risk?
High severity (CVSS 8.7, AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N) driven by a low bar to exploit — any authenticated user, no special privileges, a single crafted message — combined with a scope-changed impact that can escalate to full administrator account takeover. Exploitability is real-world proven: a public PoC exists and EPSS places this in the top 18% most likely to be exploited among all scored CVEs. It is not in CISA KEV and lacks a Nuclei template, so it is not yet under mass automated scanning, but the combination of trivial crafting (a Python one-liner generates the payload), broad default-config applicability, and required-but-easy user interaction (opening a shared link or reading a channel) makes this a realistic near-term threat for any internet- or intranet-facing Open WebUI deployment.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| Open WebUI | pip | >= 0.10.0, < 0.11.0 | 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-
Upgrade to Open WebUI 0.11.0 or later immediately — the fix (commit bc600d3f0, PR #26718) HTML-escapes the KaTeX error fallback so failed renders display as text rather than markup, and no configuration changes are required. Until patched, treat all chat messages, shared chat links, and channel content as untrusted input; consider restricting shared-chat/channel visibility to reduce blast radius, and instruct administrators specifically not to open shared chats from unfamiliar or low-trust users. Detection: audit logs/network egress for unexpected outbound requests from browser sessions immediately after opening a chat or shared link (token exfiltration to an external host is the tell), and review recent messages for anomalously long math blocks (deeply nested
{/}sequences inside$...$delimiters) as a forensic indicator of attempted exploitation.
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-70492?
A stored cross-site scripting flaw lets any authenticated Open WebUI user craft a chat message that crashes KaTeX's math renderer with a stack overflow, causing the app to fall back to inserting the raw, attacker-controlled source as HTML instead of escaped text, so arbitrary script runs in the browser of anyone who opens the message. This matters because the payload survives in shared chats and channels — no admin rights or non-default configuration are needed, only that a victim opens the content — and the session token sits in reachable localStorage, meaning a viewing administrator's browser session can be fully hijacked with a single crafted message. A working PoC already exists and was demonstrated stealing an admin's token via a shared chat link, and this CVE sits in the top 18% of EPSS-scored vulnerabilities by exploitation likelihood, though it is not yet in CISA KEV and CISA's own triage rates it TRACK_STAR rather than immediate action. Open-webui is a widely deployed self-hosted LLM chat UI (150 other CVEs recorded against the package, package risk score 38/100), so exposure scales with however many internal or customer-facing deployments exist. Patch to 0.11.0 immediately — the fix HTML-escapes the KaTeX error fallback — and in the meantime treat shared chat links and channel messages from any authenticated user as untrusted, since no workaround short of upgrading closes the gap.
Is CVE-2026-70492 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2026-70492, increasing the risk of exploitation.
How to fix CVE-2026-70492?
Upgrade to Open WebUI 0.11.0 or later immediately — the fix (commit bc600d3f0, PR #26718) HTML-escapes the KaTeX error fallback so failed renders display as text rather than markup, and no configuration changes are required. Until patched, treat all chat messages, shared chat links, and channel content as untrusted input; consider restricting shared-chat/channel visibility to reduce blast radius, and instruct administrators specifically not to open shared chats from unfamiliar or low-trust users. Detection: audit logs/network egress for unexpected outbound requests from browser sessions immediately after opening a chat or shared link (token exfiltration to an external host is the tell), and review recent messages for anomalously long math blocks (deeply nested `{`/`}` sequences inside `$...$` delimiters) as a forensic indicator of attempted exploitation.
What systems are affected by CVE-2026-70492?
This vulnerability affects the following AI/ML architecture patterns: LLM chat UI / front-end, shared chat / collaboration features, self-hosted model serving front-ends.
What is the CVSS score for CVE-2026-70492?
CVE-2026-70492 has a CVSS v3.1 base score of 8.7 (HIGH). The EPSS exploitation probability is 0.27%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0049 Exploit Public-Facing Application AML.T0078 Drive-by Compromise AML.T0091.000 Application Access Token Compliance Controls Affected
What are the technical details?
Original Advisory
## Summary Any authenticated user can store a chat message whose math block makes KaTeX fail with a stack overflow instead of a parse error. When that happens the renderer falls back to inserting the original math source into the page as HTML rather than as text, so script in the message runs in the browser of whoever views it. Every surface that renders messages is affected, including shared chats and channels, and the missing control is output escaping on the error path. ## Preconditions Default configuration, no flags involved. The attacker needs a normal user account and a way to get the target to open the content: a shared chat link, a channel the target reads, or any other message surface. No admin rights and no non-default settings are required on either side. ## Impact Script executes in the viewer's browser on the Open WebUI origin, which puts the session token in localStorage within reach and therefore allows taking over the viewing account. If the viewer is an administrator, that is administrator access to the instance. Exploitation needs the target to open the content, but nothing beyond that: no interaction with the message itself. Server-side data and availability are unaffected; the impact is entirely in the viewer's browser session. ## Fix Fixed in 0.11.0 by commit bc600d3f0 (PR #26718). The error path now HTML-escapes the math source before it reaches the DOM, so a failed render displays the formula as text instead of as markup. Upgrading fully resolves the issue; no configuration change is needed. ## Root cause Affected component: `src/lib/components/chat/Messages/Markdown/KatexRenderer.svelte`, the reactive block that renders math and its `catch` branch. Affected setup: releases 0.10.0 through 0.10.2, which are the versions carrying that fallback. KaTeX was called with `throwOnError: false`, which suppresses parse errors but not a `RangeError` from deeply nested input. The surrounding `catch` treated any failure as "show the original formula" and assigned the untouched source to the value that the template inserts with `{@html}`. Because the Markdown math tokenizer captures everything between the delimiters verbatim, including angle brackets and complete tags, the attacker controls that string exactly. ## Proof of concept Send a chat message (or store one via any endpoint that writes message content) consisting of a single inline math block: an opening `$`, 100000 `{` characters, an `<img src=x onerror=alert(document.domain)>` tag, 100000 `}` characters, and a closing `$`. ``` python3 -c 'N=100000; print("$"+"{"*N+"<img src=x onerror=alert(document.domain)>"+"}"*N+"$")' ``` Open the chat as any user who can view it. KaTeX overflows the stack, the fallback inserts the raw source, and the `onerror` handler fires. Replacing `alert()` with a request carrying `localStorage.token` sends the viewer's session token to an attacker-controlled host; this was demonstrated against a shared chat opened by an administrator account. ## Credits @maxntv — reported the unescaped KaTeX error fallback and demonstrated session-token theft through a shared chat.
Exploitation Scenario
An attacker signs up for a normal, unprivileged account on a target's Open WebUI instance (or compromises a low-privilege account). They craft a chat message consisting of a math block with 100,000 nested `{` characters, an embedded `<img src=x onerror=...>` tag that exfiltrates `localStorage.token` to an attacker-controlled endpoint, and 100,000 closing `}` characters, then share the chat link with — or post it in a channel read by — a target administrator. When the administrator opens the link, KaTeX's stack overflows, the app's catch handler inserts the raw source via `{@html}` instead of escaping it, and the `onerror` handler fires silently, sending the admin's session token to the attacker. The attacker then replays that token to gain full administrative access to the instance, including user accounts, connected model/API credentials, and any integrated data sources.
Weaknesses (CWE)
CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Primary
CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') CWE-79 — Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'): The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
- [Architecture and Design] Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482]. Examples of libraries and frameworks that make it easier to generate properly encoded output include Microsoft's Anti-XSS library, the OWASP ESAPI Encoding module, and Apache Wicket.
- [Implementation, Architecture and Design] Understand the context in which your data will be used and the encoding that will be expected. This is especially important when transmitting data between different components, or when generating outputs that can contain multiple encodings at the same time, such as web pages or multi-part mail messages. Study all expected communication protocols and data representations to determine the required encoding strategies. For any data that will be output to another web page, especially any data that was received from external inputs, use the appropriate encoding on all non-alphanumeric characters. Parts of the same output document may require different encodings, which will vary depending on whether the output is in the: etc. Note that HTML Entity Encoding is only appropriate for the HTML body. Consult the XSS Prevention Cheat Sheet [REF-724] for more details on the types of encoding and escaping that are needed. HTML body Element attributes (such as src="XYZ") URIs JavaScript sections Casca
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/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