/

CVE-2026-54013

Severity:

HIGH RISK

(7.6)

Stored SVG XSS (CWE-79) in Open WebUI Model Profiles

CVE-2026-54013

Modified

Vulnerability type

Category:

Cross-Site Scripting (XSS)

CWE:

CWE-79, CWE-116, CWE-693

Impact:

Account Takeover via Stored XSS

Severity:

HIGH RISK

(7.6)

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

Open WebUI prior to 0.9.6 contains a stored cross-site scripting flaw in model profile images that allows attackers to embed malicious SVG payloads.

Any authenticated user with default workspace model permissions can inject scriptable SVG data URLs, leading to full account takeover when other users view the model image.

Affected context

This vulnerability appears in Open WebUI's model profile image handling, where image URLs can be set to arbitrary data URLs without sufficient validation.

In affected deployments, users with workspace.models permission (enabled by default) can update model metadata, including profile images.

The ModelMeta class lacks a validator for profile_image_url, and the image-serving endpoint does not enforce a MIME allowlist or add protective headers, allowing SVG-based script execution in browsers that render the image.

Exploit preconditions

  • Attack surface: Web UI model profile image feature and associated image URL endpoint
  • Required access: Authenticated user with workspace.models permission (default-enabled in many setups)
  • Trigger point: A victim user navigates to a page or direct URL where the malicious model profile image is rendered by the browser
  • Why exploitation is possible: The application accepts unvalidated data:image/svg+xml URLs, lacks server-side content-type enforcement or nosniff protection, and does not sanitize or neutralize active content in SVG images, enabling stored XSS in the profile image context

Why this happens

The core issue is incomplete input validation and output encoding for profile image URLs associated with models.

Unlike user and webhook profile images, the ModelMeta class omits a field-level validator for profile_image_url, allowing attacker-controlled data URLs that can embed scriptable SVG content.

On the serving side, the image endpoint does not enforce a restrictive MIME type allowlist or apply X-Content-Type-Options: nosniff, nor does it strip active content from SVGs.

Together, these omissions map to CWE-79 (Improper Neutralization of Input During Web Page Generation), CWE-116 (Improper Encoding or Escaping of Output), and CWE-693 (Protection Mechanism Failure), where untrusted data is rendered in a browser context without appropriate safeguards.

Potential impact

  • Attacker-controlled JavaScript may execute in the victim's browser session
  • An attacker could take over victim accounts by stealing session tokens or performing authenticated actions on their behalf
  • Workspace data and configuration may be modified or exfiltrated
  • Further pivoting into administrative functionality can occur if privileged users view the malicious profile image

General mitigation guidance

Pattern-based mitigation focuses on consistently validating and constraining all user-supplied URLs and media content, especially those rendered in browser contexts.

Recommended defensive approaches include:

  • Enforcing strict URL validation and rejecting or normalizing data URLs and non-image MIME types for profile images
  • Applying robust output encoding and avoiding direct embedding of untrusted content in HTML or SVG-rendering surfaces
  • Implementing a MIME-type allowlist and adding headers like X-Content-Type-Options: nosniff for any image-serving endpoints
  • Isolating active content by serving untrusted images from separate domains or sandboxed contexts where script execution is impossible
  • Reducing default permissions so only trusted roles can edit model metadata, including profile images

How teams detect issues like this

Detection typically relies on combining code-level and behavior-level checks:

  • Static analysis rules that flag use of unvalidated data URLs, dynamic content-type handling, or direct reflection of user-controlled values into HTML or image responses
  • Code review practices that examine all profile-image and avatar features to ensure consistent validators, sanitization, and strict MIME handling
  • Security testing and automated scanners configured to probe SVG and data URL vectors for XSS in any image or attachment endpoints
  • Policy-based controls that require defensive headers and content-type enforcement on all file and media-serving routes, verified via CI/CD or runtime observability tools

Sources

SourceLink
github.comgithub.com/open-webui/open-webui/security/advisories/GHSA-v2qm-5wxj-qhj7

Frequently asked

questions

Exploitation is limited to authenticated users who can edit model metadata, but this permission is typically enabled by default. Any such user can plant a malicious profile image that attacks anyone who views it, including administrators.

The attacker needs an account with workspace.models permission. They do not require elevated or administrative privileges—basic authenticated access with this capability is sufficient.

Apply consistent validation and sanitization to all profile image URLs, disallow data URLs and active SVG content, and enforce strict MIME-type checking with protective headers on image-serving endpoints. Ensure that any user-controlled data rendered in a browser context is properly encoded.

Adopt a centralized validation and encoding strategy for all user-supplied content, perform security-focused code reviews on UI and media features, enforce least-privilege defaults for editing metadata, and integrate automated tests or scanners that specifically check for SVG and data URL XSS vectors.

Find out what's already
exploitable in your codebase.