NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Open WebUI

CVE-2026-45299: Open WebUI has Stored Cross-Site Scripting In Profile Picture

mediumCVSS 3.1 5.4GHSA-6gh2-q7cp-9qf6

Open WebUI before 0.8.0 stores any data: URI in a user's profile_image_url and serves it back. A user can plant an SVG that runs script in the application origin when another user, including an admin, loads the avatar. That can steal the JWT and take over the account. Fixed in 0.8.0.

Published May 14, 2026 · Updated May 19, 2026 · Analysis Oct 27, 2026

What an attacker can do

The profile update form accepted arbitrary data: URIs with no MIME check. In v0.7.0, get_user_profile_image_by_id() in backend/open_webui/routers/users.py split the stored value, base64-decoded it and returned a StreamingResponse whose media_type came from the user-controlled data: header, with Content-Disposition inline.

Set to image/svg+xml, the response is an SVG whose embedded script runs in the Open WebUI origin when someone opens GET /api/v1/users/{user_id}/profile/image. The script can read the JWT from localStorage. That gives full account takeover of any viewer, admins included.

A second path, reported earlier, used data:text/html opened through Open image in new tab. That script runs in the data: origin, so it is limited to social engineering or redirects.

The attacker needs a normal account (CVSS: low privileges, user interaction required, changed scope, NVD 5.4). On a shared instance this is a route from any member to admin.

Who is affected

pip package open-webui, all versions below 0.8.0. Check:

pip show open-webui

For Docker, read the image tag or the version shown in the app's About settings. Multi-user instances where members can see each other's avatars are the real exposure.

open-webui

Ecosystem
PyPI
Affected
< 0.8.0
Fixed in
0.8.0
Check
pip show open-webui

How to fix it

Upgrade to open-webui 0.8.0 or later:

pip install -U open-webui

Commit 773787c74 adds a validate_profile_image_url validator on UserModel, UpdateProfileForm and SignupForm. It rejects data:image/svg+xml and any non-image data URI. Only data:image png, jpeg, gif and webp base64, internal paths and http(s) URLs pass. The advisory names no workaround.

The validator blocks new values. Profile images saved earlier may already hold a bad URI, so review stored values.

How to tell if you were hit

Query the user table for profile_image_url values that start with data:text/html or data:image/svg+xml. Look in access logs for requests to /api/v1/users/ID/profile/image from admin sessions followed by unusual API calls. Rotate tokens for any admin who may have viewed a flagged avatar.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

The profile_image_url field on the user profile update form accepted arbitrary data: URI values without MIME-type validation. Two distinct attack paths were independently demonstrated by separate reporters:

  1. `data:text/html;base64,...` in a new browser tab (raresvis, 2025-04-17) — when a victim right-clicks a user's profile picture and chooses "Open image in new tab", the browser navigates to the data: URL and executes embedded scripts in the data: origin. Limited to social-engineering / redirect attacks because the script does not run in the application origin.
  1. `data:image/svg+xml;base64,...` re-served by the application origin (Gh05t666nero, 2026-01-09) — GET /api/v1/users/{user_id}/profile/image decoded the base64 and returned StreamingResponse(media_type=<user-controlled>) extracted from the data: header. With media_type=image/svg+xml and Content-Disposition: inline, the SVG-embedded scripts executed in the application origin, enabling JWT theft from localStorage and full account takeover of any user — including admins — who loaded the malicious profile image URL.

Both attack paths share the same root cause (lack of MIME-type validation on profile_image_url) and are closed by the same fix.

Vulnerable code (v0.7.0)

backend/open_webui/routers/users.py get_user_profile_image_by_id():

elif user.profile_image_url.startswith("data:image"):
    header, base64_data = user.profile_image_url.split(",", 1)
    image_data = base64.b64decode(base64_data)
    image_buffer = io.BytesIO(image_data)
    media_type = header.split(";")[0].lstrip("data:")  # user-controlled
    return StreamingResponse(
        image_buffer,
        media_type=media_type,
        headers={"Content-Disposition": "inline"},
    )

Fix

Commit 773787c74 (2026-02-11), first contained in tag v0.8.0, applies the validate_profile_image_url field validator to every form that accepts profile_image_url (UserModel, UpdateProfileForm, SignupForm in backend/open_webui/models/users.py and backend/open_webui/models/auths.py). The validator explicitly rejects data:image/svg+xml and any non-image data URI, allowing only data:image/{png,jpeg,gif,webp};base64 plus known internal paths and http(s):// URLs. This blocks both attack vectors at form submission time, so a malicious URL can no longer be persisted to the database.

Credits

  • raresvis — discovered the data:text/html-via-new-tab path
  • Gh05t666nero — discovered the data:image/svg+xml-via-server-side path (the more severe origin-XSS vector that determined the consolidated CVSS)

Per our Report Handling policy, the cluster is consolidated into the earliest filing with credit to every reporter who demonstrated a distinct exploitation path.

Affected / patched versions

  • Affected: < 0.8.0
  • Patched: >= 0.8.0

Credited to raresvis, Gh05t666nero, Classic298.

Questions

Is CVE-2026-45299 exploitable without an account?

The vector sets privileges to low, so the attacker needs an account, or open sign-up to create one. Signup forms accepted the field too.

Why is the score only medium?

The vector needs a user to load the image and rates confidentiality and integrity impact low. The stored JWT theft path can still lead to takeover of the viewer's account.

Which version fixes it?

open-webui 0.8.0 fixes it. Versions below 0.8.0 accept any data: URI as a profile image and serve it back from the app origin.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Open WebUI vulnerabilities

All Open WebUI entries