CVE-2026-45665: Open webui Cross-Site Scripting Vulnerability

HIGH
Advisory Identifier: GHSA-cqp4-qqvg-3787
CVSS 8.1
CWE-79
Published
Advisory Summary

CVE-2026-45665 is a HIGH (CVSS 8.1) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Open webui libraries in the npm ecosystem. The issue involves open webui has stored xss in banner component via improper sanitization order. Remediation is available by upgrading affected packages to version 0.8.0.

CVE-2026-45665 at a Glance

CVE Identifier CVE-2026-45665
GHSA Identifier GHSA-cqp4-qqvg-3787
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Open webui
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2026-45665

To remediate this vulnerability, upgrade all affected Open webui dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

open-webui fixed: 0.8.0
npm install open-webui@0.8.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls open-webui

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-45665, inspect your project dependencies using npm:

npm ls open-webui

Analyze the terminal output to locate any version of Open webui in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.8.0), your application is affected.

Note: The npm ls open-webui command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where 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. In Open webui, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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: <a href="javascript:alert(javascript:alert(localStorage.token))">Link</a>. This resulting unsafe HTML is rendered directly via {@html ...} without further checks. `src/lib/components/common/Banner.svelte` (Line 103) ```svelte {@html marked.parse(DOMPurify.sanitize((banner?.content ?? '').replace(/\n/g, '<br>')))} ``` ### POC 1. **Attacker Action:** Log in as a compromised Admin account and navigate to **Settings > Interface > UI > Banners**. 2. **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)) ``` 3. **Execution:** Click **Save**. The malicious banner is now stored and active. 4. **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:** <img width="880" height="245" alt="image" src="https://github.com/user-attachments/assets/b70d7f65-ab34-4634-9e78-2a8a7eda1439" /> 5. **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, '<br>')))} ``` ## Resolution Fixed in **v0.8.0**. [`src/lib/components/common/Banner.svelte:103`](https://github.com/open-webui/open-webui/blob/main/src/lib/components/common/Banner.svelte#L103) 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.

CVE-2026-45665 Affected Open webui Versions

1 component(s)
Fixed Versions:
0.8.0
Product / Package Ecosystem Affected Versions Fixed Version
open-webui
npm
< 0.8.0
0.8.0

References

Frequently Asked Questions

What is CVE-2026-45665?
CVE-2026-45665 is a security vulnerability in Open webui involving Open WebUI has Stored XSS in Banner Component via Improper Sanitization Order under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Open webui versions are affected?
Affected versions include releases prior to 0.8.0 across affected packages: open-webui.
What version fixes CVE-2026-45665?
Upgrading to 0.8.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is open-webui affected?
Yes, open-webui is affected in releases prior to 0.8.0. Upgrade your dependency to 0.8.0 or later.
What is the CVSS score of CVE-2026-45665?
CVE-2026-45665 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N.
What CWE is associated with CVE-2026-45665?
CVE-2026-45665 is classified under CWE-79: 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.).
How can I check npm dependencies for CVE-2026-45665?
Run the dependency tree command: 'npm ls open-webui'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-cqp4-qqvg-3787",
  "modified" : "2026-05-19T16:00:17Z",
  "published" : "2026-05-14T20:27:45Z",
  "aliases" : [ "CVE-2026-45665" ],
  "summary" : "Open WebUI has Stored XSS in Banner Component via Improper Sanitization Order",
  "details" : "### Summary\nA 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).\n\nThis 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).\n\nConsequently, the payload successfully bypasses the existing security mechanism. An attacker can leverage this to steal the Super Admin's session token\n\n### Details\nRoot Cause: The code attempts to sanitize the input using DOMPurify.sanitize() before parsing it with marked.parse().\n\nDOMPurify cleans the raw input. Since [Link](javascript:alert(javascript:alert(localStorage.token))) is valid text (not HTML), it passes through DOMPurify unchanged.\nmarked handles the text and converts it into a clickable HTML link: <a href=\"javascript:alert(javascript:alert(localStorage.token))\">Link</a>.\nThis resulting unsafe HTML is rendered directly via {@html ...} without further checks.\n\n`src/lib/components/common/Banner.svelte` (Line 103)\n```svelte\n{@html marked.parse(DOMPurify.sanitize((banner?.content ?? '').replace(/\\n/g, '<br>')))}\n```\n### POC\n1. **Attacker Action:** Log in as a compromised Admin account and navigate to **Settings > Interface > UI > Banners**.\n2. **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.\n    ```markdown\n    [Click for Security Update](javascript:alert(localStorage.token))\n    ```\n3. **Execution:** Click **Save**. The malicious banner is now stored and active.\n4. **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.\n    **Victim Dashboard View:**\n    \n<img width=\"880\" height=\"245\" alt=\"image\" src=\"https://github.com/user-attachments/assets/b70d7f65-ab34-4634-9e78-2a8a7eda1439\" />\n\n5. **Result:** The JavaScript executes immediately within the Primary Admin's session, exposing their full-access token.\n\n### Impact\nExtend 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.\n\nDestination: Other Administrators /Primary Administrators.\nAttack 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.\nThe 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).\n\n### Recommended Patch\nModify `src/lib/components/common/Banner.svelte` (Line 103):\n\n```\n{@html DOMPurify.sanitize(marked.parse((banner?.content ?? '').replace(/\\n/g, '<br>')))}\n```\n\n## Resolution\n\nFixed in **v0.8.0**. [`src/lib/components/common/Banner.svelte:103`](https://github.com/open-webui/open-webui/blob/main/src/lib/components/common/Banner.svelte#L103) 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 ...}`.\n\nUsers on `>= 0.8.0` are not affected.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "open-webui"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.8.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.7.2"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/open-webui/open-webui/security/advisories/GHSA-cqp4-qqvg-3787"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-45665"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/open-webui/open-webui"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/open-webui/open-webui/releases/tag/v0.8.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-14T20:27:45Z",
    "nvd_published_at" : "2026-05-15T22:16:55Z"
  }
}