Open-WebUI Stored XSS Vulnerability via Model Description
Open-WebUI is vulnerable to stored cross-site scripting (XSS) where an authenticated user with model creation permissions can inject a malicious model description containing a javascript: URI within a markdown link that, when clicked, executes arbitrary JavaScript in another user's browser, potentially leading to session hijacking; this affects versions v0.3.5 through v0.8.12.
CVE search metadata
CVE search record: CVE-2024-7990. Severity: high. CVSS: 8.4. EPSS: 0.29%. KEV: no. Product: open-webui (<= 0.8.12). Brief: Open-WebUI Stored XSS Vulnerability via Model Description. Brief link: https://feed.craftedsignal.io/briefs/2026-05-08-open-webui-xss/
Triage facts
Revision 2- Applicability
- open-webui (<= 0.8.12)
- Evidence
- Unknown
- Severity
- High
- Sources
- 1 public source
- Freshness
- Revision 2May 8, 19:00 UTC
- Detection
- 2 rules
- Vulnerabilities
- 1 CVE
Revision history 1 entry · Revision 2
- Revision 2
Repaired a legacy canonical identity collision
Changed: slug
Open-WebUI versions v0.3.5 through v0.8.12 are susceptible to a stored cross-site scripting (XSS) vulnerability. This flaw allows authenticated users with model creation permissions to inject malicious JavaScript code into the model description field. When other users, including administrators, view the affected model's description in the chat UI and click the specially crafted markdown link, the injected JavaScript code executes within their browsers. This can lead to session hijacking, sensitive data theft, or other unauthorized actions. The vulnerability stems from insufficient sanitization of user-supplied model descriptions before rendering them in the user interface. The issue is resolved in version v0.9.0. This vulnerability is distinct from CVE-2024-7990, as it leverages a different bypass mechanism involving markdown links with javascript: URIs.
Attack Chain
- An attacker authenticates to the Open-WebUI instance with an account that has model creation permissions (workspace.models).
- The attacker crafts a malicious model description containing a markdown link with a
javascript:URI (e.g.,[text](javascript:alert())). - The attacker uses the
/api/v1/models/createendpoint to create a new model with the malicious description. - The Open-WebUI application stores the unsanitized model description in the database.
- A victim user (including an administrator) navigates to the chat UI and views the model with the malicious description.
- The application retrieves the model description from the database and renders it using
sanitizeResponseContent,replaceAll('\n', '<br>'),marked.parse(), and{@html ...}. - The
marked.parse()function converts the markdown link into an<a href="javascript:...">HTML element. - The victim user clicks on the malicious link, triggering the execution of the JavaScript code within their browser. This could exfiltrate the user's access token via a crafted
javascript:url.
Impact
Successful exploitation of this vulnerability allows an attacker to execute arbitrary JavaScript code within the context of a victim's browser. This can lead to a variety of malicious outcomes, including session hijacking, theft of sensitive information (such as access tokens), defacement of the user interface, and potentially, remote code execution if combined with other vulnerabilities. Given the ability to steal admin tokens, attackers can create new tools to execute arbitrary code, which impacts all Open-WebUI users.
Recommendation
- Upgrade Open-WebUI to version v0.9.0 or later, where the output of
marked.parse()is wrapped withDOMPurify.sanitize()to mitigate the XSS vulnerability. - Deploy the Sigma rule "Detect Open-WebUI Model Creation with Javascript URI" to identify attempts to create models with malicious descriptions.
- Review existing model descriptions for suspicious content, particularly markdown links with
javascript:URIs, and remove or sanitize any identified malicious entries.
Detection coverage 2
Detect Open-WebUI Model Creation with Javascript URI
highDetects the creation of Open-WebUI models with descriptions containing javascript: URIs, indicating a potential XSS attack.
Detect Open-WebUI Token Exfiltration via HTTP Server Logs
mediumDetects potential Open-WebUI access token exfiltration attempts by monitoring HTTP server logs for access attempts containing 'localStorage.token'.
Detection queries are available on the platform. Get full rules →