/

CVE-2026-45665

Severity:

HIGH RISK

(8.1)

Stored XSS in Open WebUI Banner Component

CVE-2026-45665

Analyzed

Vulnerability type

Category:

Stored Cross-Site Scripting (XSS)

CWE:

CWE-79

Impact:

Privilege Escalation via Session Hijacking

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A stored cross-site scripting (XSS) flaw in the Open WebUI Banner component allows attacker-controlled HTML and script content to be injected into a globally visible banner.

When a malicious or compromised administrator plants a payload, it is rendered for all users—including the Super Admin—enabling potential session theft and privilege escalation.

Affected context

The vulnerability arises in Open WebUI deployments that use the global Banner component for displaying messages to users.

Due to DOMPurify being applied before Markdown rendering (via the marked library), sanitization occurs on the wrong representation of the content.

In environments where administrators or integrations can modify banner content, this misordering can leave dangerous script-capable constructs in the final DOM.

The issue is especially relevant in multi-admin or semi-trusted admin setups where one administrator's changes are rendered to all users.

Exploit preconditions

  • Attack surface: Web UI, specifically the global Banner feature rendered in user browsers.
  • Required access: Ability to modify banner content (typically administrator-level permissions or compromised admin accounts).
  • Trigger point: Viewing any page where the global banner is rendered in the browser; no further user interaction is necessarily required.
  • Why exploitation is possible: The sanitization pipeline applies DOMPurify before Markdown-to-HTML conversion by marked, leaving the final HTML outside the sanitizer's protection. This lets carefully crafted content survive and become executable JavaScript in the rendered page.

Why this happens

The root cause aligns with CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-Site Scripting).

Instead of sanitizing the final HTML that is actually injected into the DOM, the application runs DOMPurify on the pre-rendered content and then uses the marked library to transform it into HTML afterward.

This sequencing error breaks the trust assumption that sanitized output will be the final content rendered to the browser.

As a result, certain payloads can be encoded in a way that appears safe before Markdown processing but becomes dangerous once converted to HTML, bypassing the intended XSS protections.

Potential impact

  • Theft of Super Admin or other users' session tokens, potentially leading to full account takeover.
  • Privilege escalation from a lower-privileged or secondary administrator account to the Primary Admin (Super Admin).
  • Execution of arbitrary JavaScript in users' browsers when they view the banner.
  • Unauthorized changes to system configuration or AI workload settings via hijacked privileged sessions.
  • Persistent compromise of user trust by injecting misleading or malicious content into the UI.

General mitigation guidance

Effective mitigation patterns focus on ensuring that sanitization is applied to the exact representation that reaches the browser and limiting who can inject rich content:

  • Apply HTML sanitization (e.g., via DOMPurify or equivalent) after all transformations such as Markdown rendering, template expansion, or concatenation, so that the final HTML is what gets neutralized.
  • Treat all banner or announcement content as untrusted, even when submitted by administrators, and enforce strict policies on allowed tags and attributes.
  • Prefer safe-by-default rendering components that escape user-supplied content unless explicitly whitelisted.
  • Reduce the privileges of administrative accounts by separating "content editors" from "system owners," and ensure critical actions require higher trust.
  • Avoid executing or injecting dynamic scripts via banners or announcements; use static, text-only or strictly limited markup where possible.

How teams detect issues like this

Detection approaches can combine code-focused and behavior-focused methods:

  • Static analysis and code review: Look for UI flows where user- or admin-supplied content is passed into Markdown renderers (like marked) and then inserted into the DOM using innerHTML-style APIs without a final sanitization step.
  • Security review of pipelines: Verify the order of operations in content pipelines (e.g., Markdown → HTML → sanitize → render) and flag any instances where sanitization happens before transformations.
  • Browser-side testing: Use automated UI tests or security scanners configured to input benign-looking but XSS-oriented payloads into banner or announcement fields, observing whether scripts execute in the rendered UI.
  • Policy enforcement: Introduce development policies that ban direct DOM insertion of derived HTML without explicit sanitization, enforced through linters or CI checks.

Sources

SourceLink
github.comgithub.com/open-webui/open-webui/security/advisories/GHSA-cqp4-qqvg-3787

Frequently asked

questions

The immediate exploit path assumes control of a banner-capable administrator account. However, if an attacker can compromise any admin credentials (through phishing, reused passwords, or another vulnerability), they can leverage this stored XSS to escalate to the Super Admin.

The attacker typically requires the ability to set or modify the global banner, which is usually restricted to administrators. Once this access is obtained, the malicious payload will be delivered to all users, including the Primary Admin.

Ensure that all transformations of user- or admin-supplied content (such as Markdown rendering) occur before a final, robust HTML sanitization step, and only then inject the sanitized HTML into the DOM. Avoid any code paths where post-sanitization content is further converted or concatenated into HTML.

Adopt a consistent output-encoding and sanitization strategy: treat all dynamic content as untrusted, enforce sanitization at the last step before rendering, and use frameworks or components that escape content by default. Complement this with code review guidelines, automated checks for unsafe DOM insertion patterns, and minimal-privilege design for administrative features.

Find out what's already
exploitable in your codebase.