open-webui Vulnerable to Stored XSS via Model Description
High7.3CVE-2026-44721 · Published May 8, 2026 · updated Jul 13, 2026
> [!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...
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| open-webui PyPI | < 0.9.0 | 0.9.0 |
Details and references
> [!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('<', '<') // escape < to < .replaceAll('>', '>') // escape > to > .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
- CVSS 3.1
- CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N
- Severity from
- GitHub (reviewed advisory)
- Weakness
- CWE-79
- Also known as
- CVE-2026-44721, PYSEC-2026-2725
More Open WebUI advisories
All Open WebUI| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| May 8 | Open WebUI Vulnerable to Arbitrary File Upload and Path Traversal | High7.3 | 0.1.124 |
| May 8 | Open WebUI has Improper Authorization Control | High7.3 | 0.1.124 |
| May 8 | Open WebUI has stored XSS in Excel file preview | High7.3 | 0.8.0 |
| May 8 | Open WebUI has Stored XSS in Pending User Overlay via Incorrect DOMPurify Application Order | Medium4.8 | 0.9.0 |
| May 8 | Open WebUI has Unauthorized File and Knowledge Base Content Access via RAG Vector Search | Medium6.5 | 0.9.0 |
| May 8 | Open WebUI: Deactivated Channel Members Retain Full Access to Group/DM Channels | Medium5.4 | 0.9.0 |