CVE-2026-70492: Open WebUI: Stored XSS via unescaped KaTeX render-error fallback in rendered messages
Open WebUI 0.10.0 through 0.10.2 has a stored cross-site scripting flaw in its KaTeX math renderer. Any signed-in user can post a message that runs script in the browser of whoever views it, including an administrator. This can take over the viewer's account. Upgrade to 0.11.0.
Published Aug 4, 2026 · Analysis Nov 22, 2026
What an attacker can do
The component is KatexRenderer.svelte. It calls KaTeX with throwOnError set to false. That setting hides parse errors, but not the RangeError that deeply nested input causes. A stack overflow lands in the catch branch, which falls back to showing the original formula. The fallback assigns the raw source to a value that the template inserts with the Svelte raw HTML tag. The math tokenizer keeps everything between the dollar delimiters verbatim, so the attacker controls that string exactly.
The attacker needs a normal user account and a way to get the target to open the content. A shared chat link or a channel works. No admin rights and no special settings are required. Nothing beyond opening the content is needed from the victim.
The script runs on the Open WebUI origin. The session token sits in localStorage, so the script can send it out and take over the account. If the viewer is an administrator, the attacker gets administrator access to the instance. The reporter showed this with a shared chat opened by an admin. Server data and availability are not affected directly.
Who is affected
The pip package open-webui from 0.10.0 up to but not including 0.11.0. The root-cause section narrows this to 0.10.0 through 0.10.2, the releases that carry the fallback. Default configuration is affected. Check the installed version:
pip show open-webuiFor Docker installs, check the image tag you run.
open-webui
- Ecosystem
- PyPI
- Affected
- >= 0.10.0, < 0.11.0
- Fixed in
- 0.11.0
- Check
pip show open-webui
How to fix it
Upgrade to 0.11.0. The fix is commit bc600d3f0 (PR 26718). It HTML-escapes the math source on the error path, so a failed render shows the formula as text. No configuration change is needed. The advisory lists no workaround.
pip install --upgrade open-webui==0.11.0For containers, pull a 0.11.0 or later image and restart.
How to tell if you were hit
Search stored chat and channel messages for very long runs of opening braces inside a dollar-delimited math block. The proof of concept uses 100000 braces around an image tag with an onerror handler. Look for messages containing an image or similar tag inside math delimiters. In proxy logs, look for requests from user browsers to unknown hosts that carry a token value in the query. If an admin opened a suspect shared chat, rotate that session and review recent admin actions and new accounts.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
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 ` tag, 100000 } characters, and a closing $`.
python3 -c 'N=100000; print("$"+"{"*N+""+"}"*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.
Credited to maxntv, Classic298.
Questions
- Is Open WebUI 0.10.2 affected by CVE-2026-70492?
Yes. Releases 0.10.0 through 0.10.2 carry the vulnerable KaTeX fallback. Version 0.11.0 fixes it.
- Does the attacker need admin rights?
No. A normal user account is enough. The victim only has to open the content, such as a shared chat or a channel message. If the victim is an administrator, the attacker gains admin access.
- Does it need a non-default setting?
No. The advisory says default configuration is affected and no flags are involved. The only fix is to upgrade to 0.11.0.
- Is it exploited in the wild?
No source says so. The entry is not marked as known exploited. The advisory includes a proof of concept and a demonstration of session-token theft by the reporter.
References
Read for this analysis:
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More Open WebUI vulnerabilities
All Open WebUI entriesCVE-2026-87011
Open WebUI: Unauthenticated requests can stall the server via uncached OIDC fetches in back-channel logout
high7.5Sep 10, 2026CVE-2026-87012
Open WebUI: Any authenticated user can suppress calendar alerts instance-wide via a non-numeric alert value
medium4.3Sep 10, 2026CVE-2026-87013
Open WebUI: Any authenticated user can start a non-terminating request via a folder parent cycle
medium4.3Sep 10, 2026CVE-2026-87014
Open WebUI: Admin demoted through SSO role sync keeps read and write access to all users' notes
medium6.5Sep 10, 2026CVE-2026-87015
Open WebUI: A user's session cookies are sent to tool servers configured for bearer authentication
medium6.8Sep 10, 2026CVE-2026-87016
Open WebUI: Sign-in as another user via wildcard characters in the OAuth subject claim on SQLite
high8.1Sep 10, 2026
