CVE-2025-46719 in OpenWebUIinfo

Summary

by MITRE • 05/05/2025

Open WebUI is a self-hosted artificial intelligence platform designed to operate entirely offline. Prior to version 0.6.6, 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 hosted. This can be done by creating a new function which contains malicious python code. This vulnerability also affects chat transcripts uploaded to `https://openwebui.com/c//`, allowing for wormable stored XSS in https[:]//openwebui[.]com. Version 0.6.6 contains a patch for the issue.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 05/05/2025

This vulnerability exists within Open WebUI, a self-hosted artificial intelligence platform designed for offline operation, where a critical security flaw was discovered in the rendering of HTML tags within chat messages. The vulnerability stems from insufficient input sanitization and improper HTML escaping mechanisms that allow malicious actors to inject JavaScript code directly into chat transcripts. This represents a classic stored cross-site scripting vulnerability where the malicious payload persists in the application's database and executes whenever the affected transcript is viewed by any user.

The technical implementation of this flaw allows attackers to embed JavaScript within HTML content that gets rendered in users' browsers when chat transcripts are displayed. When users open chat transcripts containing malicious code, the JavaScript executes in their browser context, enabling attackers to steal access tokens and assume full user control. The vulnerability is particularly dangerous because chat transcripts can be shared within the same server environment or distributed across the entire open-webui community when community sharing is enabled. This creates a propagation vector that allows the attack to spread organically through user interactions and shared content.

The operational impact of this vulnerability extends beyond simple session hijacking to include potential server compromise when targeting administrator accounts. An attacker who successfully exploits this vulnerability against an admin user can leverage the elevated privileges to execute arbitrary Python code on the backend server through function creation capabilities. This progression from client-side to server-side compromise demonstrates the severity of the vulnerability and aligns with attack patterns documented in the MITRE ATT&CK framework under techniques such as credential access and remote code execution. The vulnerability affects both local installations and the hosted version at https://openwebui.com/, making it a widespread concern for all users.

The remediation approach involves implementing proper HTML sanitization and input validation mechanisms that strip or escape potentially dangerous HTML tags and JavaScript content before rendering chat messages. This aligns with CWE-79, which specifically addresses cross-site scripting vulnerabilities, and requires comprehensive filtering of user-generated content to prevent malicious code injection. Organizations should immediately update to version 0.6.6 or later, which includes the necessary patch to address the HTML rendering vulnerability. Additionally, administrators should consider implementing additional monitoring for suspicious chat content and user behavior patterns that might indicate exploitation attempts. The vulnerability also highlights the importance of secure coding practices in web applications and the necessity of thorough input validation, particularly for applications that process and display user-generated content.

Responsible

GitHub M

Reservation

04/28/2025

Disclosure

05/05/2025

Moderation

accepted

CPE

ready

EPSS

0.00434

KEV

no

Activities

very low

Sources

Do you know our Splunk app?

Download it now for free!