Open WebUI Affected by an External Model Server (Direct Connections) Code Injection via SSE Events
Description
Open WebUI is a self-hosted artificial intelligence platform designed to operate entirely offline. Versions 0.6.224 and prior contain a code injection vulnerability in the Direct Connections feature that allows malicious external model servers to execute arbitrary JavaScript in victim browsers via Server-Sent Event (SSE) execute events. This leads to authentication token theft, complete account takeover, and when chained with the Functions API, enables remote code execution on the backend server. The attack requires the victim to enable Direct Connections (disabled by default) and add the attacker's malicious model URL, achievable through social engineering of the admin and subsequent users. This issue is fixed in version 0.6.35.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
open-webuinpm | < 0.6.35 | 0.6.35 |
open-webuiPyPI | < 0.6.35 | 0.6.35 |
Affected products
1- Range: < 0.6.35
Patches
18af6a4cf21b7refac: direct connections
1 file changed · +3 −1
backend/open_webui/utils/middleware.py+3 −1 modified@@ -2349,7 +2349,9 @@ async def flush_pending_delta_data(threshold: int = 0): ) if data: - if "event" in data: + if "event" in data and not getattr( + request.state, "direct", False + ): await event_emitter(data.get("event", {})) if "selected_model_id" in data:
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
4- github.com/advisories/GHSA-cm35-v4vp-5xvxghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2025-64496ghsaADVISORY
- github.com/open-webui/open-webui/commit/8af6a4cf21b756a66cd58378a01c60f74c39b7caghsax_refsource_MISCWEB
- github.com/open-webui/open-webui/security/advisories/GHSA-cm35-v4vp-5xvxghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.