/

CVE-2026-44721

Severity:

HIGH RISK

(7.3)

XSS in Open WebUI Model Chat Interface

CVE-2026-44721

Modified

Vulnerability type

Category:

Cross-Site Scripting (XSS)

CWE:

CWE-79

Impact:

Stored Cross-Site Scripting leading to arbitrary JavaScript execution in user browsers

Severity:

HIGH RISK

(7.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A stored cross-site scripting (XSS) vulnerability in Open WebUI allows an authenticated user with model creation permissions to embed malicious JavaScript in a model's data.

When other users, including administrators, view the affected model in the chat UI, the injected script can execute in their browsers, potentially compromising their sessions and data.

Affected context

The vulnerability arises in Open WebUI deployments where:

  • Multiple users share the same workspace environment
  • Users have been granted workspace.models or equivalent model creation permissions
  • Model definitions, metadata, or associated content are rendered in the chat UI without strict output encoding

The issue manifests when a user with creation privileges stores content that is later rendered as HTML/JavaScript in other users' browsers, without adequate sanitization or escaping.

Exploit preconditions

  • Attack surface: Web-based chat UI within Open WebUI.
  • Required access: Authenticated account with permission to create or modify models (workspace.models).
  • Trigger point: Another user (including admins) opens or interacts with the maliciously crafted model in the chat UI.
  • Why exploitation is possible: User-controlled model data is rendered into the DOM without appropriate output encoding or sanitization, allowing embedded script content to execute in the context of the victim's session.

Why this happens

This issue is a classic example of CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-Site Scripting).

The application takes user-supplied model content (such as names, descriptions, prompts, or other model-related fields) and injects it into HTML pages without consistently applying context-aware output encoding or sanitization.

As a result, untrusted data is interpreted by the browser as active JavaScript rather than inert text, enabling arbitrary script execution whenever other users view the affected model in the chat interface.

Potential impact

  • Theft or misuse of authentication cookies or session tokens from affected users' browsers
  • Execution of arbitrary actions on behalf of victims within Open WebUI (e.g., changing configurations, creating or deleting resources)
  • Exposure or exfiltration of sensitive data displayed or accessible through the UI
  • Phishing or social engineering via deceptive UI modifications or overlays
  • Potential pivoting to other systems if the UI integrates with additional backend services or APIs

General mitigation guidance

Effective mitigation focuses on systematic output encoding and strict handling of untrusted data:

  • Apply context-aware output encoding for all user-controlled fields rendered in the chat UI (e.g., HTML, attribute, JavaScript, and URL contexts).
  • Use a robust HTML sanitization layer for rich-text content, allowing only a minimal, whitelisted subset of tags and attributes.
  • Separate data from presentation logic by using templating frameworks that auto-escape variables by default.
  • Treat all model metadata and user-provided content as untrusted, even when submitted by authenticated users with elevated permissions.
  • Implement principle of least privilege for model creation permissions, granting them only where necessary and monitoring usage.

How teams detect issues like this

High-level detection approaches may include:

  • Static analysis: Configure rules to identify direct DOM injections (e.g., use of innerHTML, dangerouslySetInnerHTML, or equivalent APIs) that involve user-controlled model data.
  • Code review: During reviews, flag any rendering of model names, descriptions, prompts, or other user-editable fields that are inserted into HTML templates without explicit encoding.
  • Security testing: Use automated and manual penetration testing to inject benign script markers into model fields and verify whether they are rendered as executable code.
  • Logging and monitoring: Monitor for anomalous UI behavior, unexpected DOM changes, or error logs that might indicate active XSS exploitation.

Sources

SourceLink
github.comgithub.com/open-webui/open-webui/security/advisories/GHSA-gf5m-wcrh-7928

Frequently asked

questions

It depends on how Open WebUI is exposed. Any user who can authenticate and has model creation permissions can exploit the issue. Victims only need to access the malicious model in the chat UI for the payload to execute.

The attacker must have a valid account on the instance and the workspace.models (or equivalent) permission to create or modify models. No direct administrative access is required; regular users with these permissions can exploit the vulnerability.

The safest approach is to ensure that all user-controlled fields related to models are treated as untrusted and are properly encoded or sanitized before being rendered. Use frameworks or templating systems that auto-escape by default and avoid constructing raw HTML from user input.

Establish a secure coding guideline that mandates context-aware output encoding, consistently treat authenticated user input as untrusted, introduce security-focused code review checklists, and augment the development pipeline with automated checks (static analysis and dynamic tests) specifically targeting XSS patterns.

Find out what's already
exploitable in your codebase.