CVE-2026-45665: Open WebUI has Stored XSS in Banner Component via Improper Sanitization Order
Summary A Stored Cross-Site Scripting (XSS) vulnerability exists in the Banner component due to an improper sanitization order (specifically, DOMPurify is executed before the marked library). This vulnerability allows a compromised or malicious administrator to plant a malicious payload in the global banner.
Published May 14, 2026 · Updated May 19, 2026
Affected packages
open-webui
- Ecosystem
- npm
- Affected
- <= 0.7.2
- Fixed in
- 0.8.0
- Check
npm ls open-webui
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
A Stored Cross-Site Scripting (XSS) vulnerability exists in the Banner component due to an improper sanitization order (specifically, DOMPurify is executed before the marked library).
This vulnerability allows a compromised or malicious administrator to plant a malicious payload in the global banner. Crucially, this vector enables Privilege Escalation, as the malicious banner is rendered for all users, including the Super Admin (Primary Admin).
Consequently, the payload successfully bypasses the existing security mechanism. An attacker can leverage this to steal the Super Admin's session token
Details
Root Cause: The code attempts to sanitize the input using DOMPurify.sanitize() before parsing it with marked.parse().
DOMPurify cleans the raw input. Since [Link](javascript:alert(javascript:alert(localStorage.token))) is valid text (not HTML), it passes through DOMPurify unchanged. marked handles the text and converts it into a clickable HTML link: Link. This resulting unsafe HTML is rendered directly via {@html ...} without further checks.
src/lib/components/common/Banner.svelte (Line 103)
{@html marked.parse(DOMPurify.sanitize((banner?.content ?? '').replace(/\n/g, '
')))}POC
- Attacker Action: Log in as a compromised Admin account and navigate to Settings > Interface > UI > Banners.
- Injection: Add a new banner and enter the following payload in the content field. This payload creates a link that alerts the user's session token when clicked. ``
markdown [Click for Security Update](javascript:alert(localStorage.token))`` - Execution: Click Save. The malicious banner is now stored and active.
- Victim Action (Privilege Escalation): The Primary Admin logs in and sees the banner on the main dashboard. Believing it to be a system notification, they click the link. Victim Dashboard View:
- Result: The JavaScript executes immediately within the Primary Admin's session, exposing their full-access token.
Impact
Extend permissions and damage to the entire system. You need administrator privileges to create banners, but this vulnerability is important because it can attack primary administrators and other administrators.
Destination: Other Administrators /Primary Administrators. Attack Vector: Corrupting all administrator accounts (even those with limited scope if future granular privileges exist or simply credentials are compromised) could allow an attacker to set traps for the default administrator. The result: Unlike self-XSS or simple administrator configuration changes, this allows you to capture active sessions for the most privileged users and bypass authentication controls such as MFA (because the session is already active).
Recommended Patch
Modify src/lib/components/common/Banner.svelte (Line 103):
{@html DOMPurify.sanitize(marked.parse((banner?.content ?? '').replace(/\n/g, '
')))}Resolution
Fixed in v0.8.0. `src/lib/components/common/Banner.svelte:103` now applies the sanitization in the correct order: DOMPurify.sanitize(marked.parse(...)). marked.parse runs first and converts [text](javascript:...) markdown into the corresponding HTML link element; DOMPurify.sanitize then strips the javascript: URL and any other dangerous attributes/elements before the result reaches {@html ...}.
Users on >= 0.8.0 are not affected.
Credited to POV9en, Classic298.
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. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-45346
Open WebUI Has Stored Cross-Site Scripting in SVG Renderer
medium5.1May 14, 2026CVE-2026-45395
Open WebUI: Missing `workspace.tools` Authorization Check on Tool Update Endpoint Allows Privilege Escalation to Code Execution
high7.2May 14, 2026CVE-2026-44721
open-webui Vulnerable to Stored XSS via Model Description
high7.3May 8, 2026CVE-2025-65959
Open WebUI Vulnerable to Stored DOM XSS via Note 'Download PDF'
high8.7Dec 4, 2025CVE-2025-64495
Open WebUI vulnerable to Stored DOM XSS via prompts when 'Insert Prompt as Rich Text' is enabled resulting in ATO/RCE
high8.7Nov 7, 2025CVE-2025-64496
Open WebUI Affected by an External Model Server (Direct Connections) Code Injection via SSE Events
high7.3Nov 7, 2025
