CVE-2025-46719: Open WebUI vulnerable to stored XSS via unescaped markdown token in MarkdownTokens.svelte leading to full account takeover and RCE via functions
A 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.
If 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.
This vulnerability also affects chat transcripts uploaded to https://openwebui.com/c/<user>/<chat_id>, allowing for wormable stored XSS in https://openwebui.com
References
- github.com/advisories/GHSA-9f4f-jv96-8766
- github.com/open-webui/open-webui/blob/main/src/lib/components/chat/Messages/Markdown/MarkdownTokens.svelte
- github.com/open-webui/open-webui/commit/6fd082d55ffaf6eb226efdeebc7155e3693d2d01
- github.com/open-webui/open-webui/releases/tag/v0.6.6
- github.com/open-webui/open-webui/security/advisories/GHSA-9f4f-jv96-8766
- nvd.nist.gov/vuln/detail/CVE-2025-46719
Code Behaviors & Features
Detect and mitigate CVE-2025-46719 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →