Medium

Open WebUI has Stored XSS in Pending User Overlay via Incorrect DOMPurify Application Order

  • Disclosed: 08.05.2026
  • Updated: 11.10.2026 14:18

Vulnerability Details

CWE-79: Cross-site Scripting (XSS)

The AccountPending.svelte component renders the admin-configured "Pending User Overlay Content" using marked.parse() inside {@html} with an incorrect DOMPurify application order:

Vulnerable Code

src/lib/components/layout/Overlay/AccountPending.svelte (lines 43-48):

svelte
{@html marked.parse(
    DOMPurify.sanitize(
        ($config?.ui?.pending_user_overlay_content ?? '').replace(/\n/g, '<br>')
    )
)}

DOMPurify is applied to the raw Markdown input before marked.parse() processes it. This is the wrong order. DOMPurify sanitizes the Markdown text (which contains no HTML tags), then marked.parse() converts Markdown link syntax into HTML <a> tags with javascript: href, and the result is rendered with {@html} unsanitized.

The correct pattern (used elsewhere in the codebase, e.g., NotebookView.svelte:77) is:

js
DOMPurify.sanitize(marked.parse(src))  // sanitize AFTER markdown parsing

Steps to Reproduce

Prerequisites

  • Open WebUI v0.8.10
  • Admin account
  • A second user account with "pending" role

Steps

  1. Log in as admin and navigate to Admin Settings → Settings → General.

  2. Set Default User Role to pending.

  3. In the Pending User Overlay Content field, enter:

# Account Pending

Your account is under review.

[Contact Support](javascript:alert(document.domain))
  1. Save the settings.

  2. In a separate browser (or incognito window), create a new account or log in as a pending user.

  3. The pending overlay is displayed. Click the "Contact Support" link.

  4. A JavaScript alert dialog appears showing localhost (the document domain), confirming XSS execution.

Verified Output

The alert(document.domain) executes successfully, displaying "localhost" in a JavaScript dialog box.

Impact

An admin can inject arbitrary JavaScript into the Pending User Overlay Content that executes in the browser context of any pending user who views the overlay page. This could be used to:

  • Session hijacking: Steal pending users' JWT tokens from cookies/localStorage
  • Credential theft: Replace the pending overlay with a fake login form
  • Phishing: Redirect pending users to malicious sites

While this requires admin privileges to set the overlay content, it enables an admin to attack pending users (who have not yet been granted full access). In multi-admin deployments, a compromised admin account could use this to escalate attacks.

Proposed Fix

Apply DOMPurify after marked.parse(), not before:

svelte
<!-- Before (vulnerable): -->
{@html marked.parse(
    DOMPurify.sanitize(
        ($config?.ui?.pending_user_overlay_content ?? '').replace(/\n/g, '<br>')
    )
)}

<!-- After (fixed): -->
{@html DOMPurify.sanitize(
    marked.parse(
        ($config?.ui?.pending_user_overlay_content ?? '').replace(/\n/g, '<br>'),
        { async: false }
    )
)}
<img width="1510" height="1093" alt="2026-03-23_03-07" src="https://github.com/user-attachments/assets/bcc94dd6-4f06-472b-9979-9759458c76b3" />

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Python (PyPI) open-webui < 0.9.0 0.9.0

References

CVSS score 4.8/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N
Weakness (CWE)
CWE-79
Platform
Python (PyPI)
Package
open-webui
Disclosed
08.05.2026
Updated
11.10.2026 14:18

Sources and licenses

OSV / GitHub Advisory Database - PYSEC-2026-2724 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-fq3v-xjjx-95rc - CC BY 4.0

Vulnerability history: open-webui

All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (161) in the archive
Total entries
161
First → latest
08.2024 09.2026
Without a fix
11
Exploited in attacks
0

Severity breakdown

  • Critical 1
  • High 77
  • Medium 75
  • Low 8

Disclosures per year

  1. 2024: 3
  2. 2025: 21
  3. 2026: 137
Severity:
  1. Open WebUI has Stored XSS in Pending User Overlay via Incorrect DOMPurify Application Order this entry
    Medium · 4.8 CVE-2026-44568 < 0.9.0 0.9.0
  2. High · 7.7 CVE-2026-59221 >= 0.9.6, < 0.10.0 0.10.0
  3. High · 7.3 CVE-2026-59214 < 0.10.0 0.10.0
  4. High · 8.7 CVE-2026-54011 < 0.9.6 0.9.6
  5. High · 7.1 CVE-2026-45349 < 0.9.0 0.9.0
Show more (20) Showing 41 of 79

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.