CVE-2025-64495

8.7 HIGH

📋 TL;DR

Open WebUI versions 0.6.34 and below contain a DOM-based cross-site scripting (XSS) vulnerability in the custom prompt insertion feature. When 'Insert Prompt as Rich Text' is enabled, malicious users with prompt creation permissions can inject JavaScript payloads that execute when other users insert those prompts via the / command interface. This affects all self-hosted Open WebUI instances running vulnerable versions.

💻 Affected Systems

Products:
  • Open WebUI
Versions: 0.6.34 and below
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability requires 'Insert Prompt as Rich Text' feature to be enabled, which appears to be a default or commonly used configuration based on the advisory.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Malicious actor with prompt creation privileges plants persistent XSS payload that steals session cookies, credentials, or performs actions as authenticated users when they insert the malicious prompt, potentially leading to full account compromise.

🟠

Likely Case

Authenticated user with prompt creation rights exploits the vulnerability to steal session tokens or credentials from other users who insert their malicious prompts, enabling lateral movement within the application.

🟢

If Mitigated

With proper input validation and output encoding, the risk is limited to users who intentionally insert untrusted prompts, but the default configuration remains vulnerable.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires authenticated user with prompt creation permissions. The vulnerability is straightforward to exploit once an attacker has the required access level.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 0.6.35

Vendor Advisory: https://github.com/open-webui/open-webui/security/advisories/GHSA-w7xj-8fx7-wfch

Restart Required: Yes

Instructions:

1. Backup your Open WebUI configuration and data. 2. Update Open WebUI to version 0.6.35 or later using your deployment method (Docker, manual install, etc.). 3. Restart the Open WebUI service. 4. Verify the update was successful by checking the version.

🔧 Temporary Workarounds

Disable Rich Text Prompt Insertion

all

Disable the 'Insert Prompt as Rich Text' feature globally to prevent exploitation of the vulnerable code path.

Modify Open WebUI configuration to disable rich text prompt insertion feature

Restrict Prompt Creation Permissions

all

Tighten access controls to limit which users can create custom prompts, reducing the attack surface.

Review and modify user role permissions in Open WebUI configuration

🧯 If You Can't Patch

  • Disable the 'Insert Prompt as Rich Text' feature immediately in all configurations
  • Implement strict Content Security Policy (CSP) headers to mitigate XSS impact

🔍 How to Verify

Check if Vulnerable:

Check if Open WebUI version is 0.6.34 or below and verify if 'Insert Prompt as Rich Text' feature is enabled in the configuration.

Check Version:

Check the Open WebUI web interface settings or run: docker inspect open-webui | grep VERSION

Verify Fix Applied:

After updating to version 0.6.35 or later, verify that prompt insertion no longer uses .innerHTML without proper sanitization by checking the RichTextInput.svelte component.

📡 Detection & Monitoring

Log Indicators:

  • Unusual prompt creation activity
  • Multiple failed prompt insertion attempts
  • Suspicious JavaScript patterns in prompt content

Network Indicators:

  • Unexpected external requests from the Open WebUI application
  • Data exfiltration patterns

SIEM Query:

source="open-webui" AND (event="prompt_creation" OR event="prompt_insertion") AND content CONTAINS "<script>" OR content CONTAINS "javascript:"

🔗 References

📤 Share & Export