Skip to content

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

Moderate severity GitHub Reviewed Published May 5, 2026 in open-webui/open-webui • Updated May 15, 2026

Package

pip open-webui (pip)

Affected versions

<= 0.8.12

Patched versions

0.9.0

Description

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):

{@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:

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 SettingsSettingsGeneral.

  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:

<!-- 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 }
    )
)}

2026-03-23_03-07

### References - https://github.com/open-webui/open-webui/security/advisories/GHSA-fq3v-xjjx-95rc - https://nvd.nist.gov/vuln/detail/CVE-2026-44568
@doge-woof doge-woof published to open-webui/open-webui May 5, 2026
Published to the GitHub Advisory Database May 8, 2026
Reviewed May 8, 2026
Published by the National Vulnerability Database May 15, 2026
Last updated May 15, 2026

Severity

Moderate

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
Low
Privileges required
High
User interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
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:L/PR:H/UI:R/S:C/C:L/I:L/A:N

EPSS score

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-44568

GHSA ID

GHSA-fq3v-xjjx-95rc

Source code

Credits

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