{"id":"CVE-2026-45299","aliases":["CVE-2026-45299","GHSA-6gh2-q7cp-9qf6","PYSEC-2026-2708"],"related":[],"kind":"vulnerability","state":"published","title":"Open WebUI: Stored Cross-Site Scripting In Profile Picture","summary":"Open WebUI is a self-hosted artificial intelligence platform designed to operate entirely offline. Prior to 0.8.0, the profile_image_url field on the user profile update form accepted arbitrary data: URI values without MIME-type validation, resulting in a XSS vulnerability. This vulnerability is fixed in 0.8.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Open WebUI is a self-hosted artificial intelligence platform designed to operate entirely offline. Prior to 0.8.0, the profile_image_url field on the user profile update form accepted arbitrary data: URI values without MIME-type validation, resulting in a XSS vulnerability. This vulnerability is fixed in 0.8.0.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nThe `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:\n\n1. **`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.\n\n2. **`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.\n\nBoth attack paths share the same root cause (lack of MIME-type validation on `profile_image_url`) and are closed by the same fix.\n\n## Vulnerable code (v0.7.0)\n\n`backend/open_webui/routers/users.py` `get_user_profile_image_by_id()`:\n\n```python\nelif user.profile_image_url.startswith(\"data:image\"):\n    header, base64_data = user.profile_image_url.split(\",\", 1)\n    image_data = base64.b64decode(base64_data)\n    image_buffer = io.BytesIO(image_data)\n    media_type = header.split(\";\")[0].lstrip(\"data:\")  # user-controlled\n    return StreamingResponse(\n        image_buffer,\n        media_type=media_type,\n        headers={\"Content-Disposition\": \"inline\"},\n    )\n```\n\n## Fix\n\nCommit `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.\n\n## Credits\n\n- **raresvis** — discovered the `data:text/html`-via-new-tab path\n- **Gh05t666nero** — discovered the `data:image/svg+xml`-via-server-side path (the more severe origin-XSS vector that determined the consolidated CVSS)\n\nPer our Report Handling policy, the cluster is consolidated into the earliest filing with credit to every reporter who demonstrated a distinct exploitation path.\n\n## Affected / patched versions\n\n- Affected: `< 0.8.0`\n- Patched: `>= 0.8.0`","format":"markdown","source":"ghsa"},{"lang":"es","text":"Open WebUI es una plataforma de inteligencia artificial autoalojada diseñada para operar completamente sin conexión. Antes de 0.8.0, el campo profile_image_url en el formulario de actualización del perfil de usuario aceptaba valores URI de tipo ’data:’ arbitrarios sin validación de tipo MIME, lo que resultaba en una vulnerabilidad XSS. Esta vulnerabilidad está corregida en 0.8.0.","source":"nvd"}],"published":"2026-05-14T20:15:19.000Z","modified":"2026-11-11T20:10:00.273Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"< 0.8.0","status":"affected"}],"vendor":"open-webui","product":"open-webui","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.8.0"}],"ecosystem":"PyPI","package":"open-webui","purl":"pkg:pypi/open-webui","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.8.0"}],"vendor":"openwebui","product":"open_webui","cpe":"cpe:2.3:a:openwebui:open_webui:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.8.0"}],"ecosystem":"PyPI","package":"open-webui","purl":"pkg:pypi/open-webui","source":"pysec"}],"references":[{"url":"https://github.com/open-webui/open-webui/security/advisories/GHSA-6gh2-q7cp-9qf6","tags":["mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45299","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.8.0","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/open-webui","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-6gh2-q7cp-9qf6","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-05-15T22:20:06.819Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-45299","url":"https://www.cve.org/CVERecord?id=CVE-2026-45299","licence":"CVE Terms of Use","modified":"2026-05-15T22:21:26.206Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-6gh2-q7cp-9qf6","url":"https://github.com/advisories/GHSA-6gh2-q7cp-9qf6","licence":"CC-BY-4.0","modified":"2026-07-13T16:43:18.587Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-45299","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45299","licence":"Public domain","modified":"2026-11-11T20:10:00.273Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2708","url":"https://osv.dev/vulnerability/PYSEC-2026-2708","licence":"CC-BY-4.0","modified":"2026-07-13T16:32:17.936Z"}],"updatedAt":"2026-11-25T22:59:21.872Z","epss":{"score":0.00199,"percentile":0.10188,"date":"2026-12-01T12:00:22.000Z"}}