Open WebUI Direct Connections: Malicious SSE Events, Token Theft and Conditional RCE
Cato validated code execution and login-token theft through a malicious model endpoint in Open WebUI, a self-hosted AI-chat interface. The victim must use an enabled Direct Connections integration; the endpoint’s SSE execute event runs in the browser without requiring a model-generated attack. Reusing the token can additionally reach backend Python execution only when the account has workspace.tools permission.
A protocol event becomes executable code: with Direct Connections enabled, a victim connects to an attacker’s OpenAI-compatible server and sends an ordinary prompt. A Server-Sent Events (SSE) execute message reaches new Function in the vulnerable frontend. This is application code injection, not a demonstrated prompt-injection attack.
Token theft and backend RCE are distinct: same-origin JavaScript reads localStorage.token and transmits the login JWT. Replaying it grants the victim’s existing account authority. Cato’s backend Tools route additionally requires workspace.tools; stealing an ordinary user token does not itself confer that permission or administrator status.
Research and versions: the vendor and Cato identify CVE-2025-64496, affected versions 0.6.34 and older, and the fix in 0.6.35. Direct Connections is disabled by default. The sources establish controlled validation, not malicious operational exploitation.
Deployed AI Software Vulnerability Remediation Lifecycle
Very High
The application owner must deploy a currently supported fixed Open WebUI build to every replica and frontend asset distribution. The historical fix is 0.6.35, which blocks execute events arriving through Direct Connections. Use a controlled mock endpoint returning a harmless execute marker: it must not execute, while ordinary text streaming still works. Read back the served assets and running version; replacing only one backend container can leave stale frontend code.
Open WebUI administrators can remove workspace.tools permission from ordinary users and verify server-side denial of Tool creation with an affected non-admin test account. Review group overrides and privileged/admin paths separately. This blocks the demonstrated token-to-Tools escalation for denied identities, not browser JavaScript, token theft or account-authorized chat access. Use native permission enforcement; the framework’s OPA example is not automatically integrated into Open WebUI.
For self-hosting, the platform owner can run the backend with non-root privileges, minimal mounts, no Docker socket and dropped capabilities. Verify effective settings and rejected host writes using a harmless Tool fixture in a disposable environment. This reduces host reach after Tools execution; a container does not protect databases or credentials legitimately mounted into the backend and does not contain the victim’s browser.
After token exposure, an authorized administrator can use account-wide Sign out all devices on a version that supports the documented database-backed revocation. Independently replay a safely retained test token against every replica and verify denial, then check clean reauthentication and live-connection closure. Current documentation says this account-wide path works without Redis; single-session sign-out has different Redis requirements and fail-open limits. API keys require separate deletion or regeneration. Confirm feature availability on the actual version rather than assuming it existed in the affected release.
After preserving evidence and isolating the affected runtime, an authorized managed-Linux administrator can terminate the Tool-executing Open WebUI backend and its child processes, only if the conditional backend-execution branch occurred. Bind the approved population to host, PID namespace, start time, executable identity and cgroup membership; use pidfd-based termination, disable relaunch, and obtain separately credentialed complete-process absence checks. A successful kill command or a missing process name is insufficient. A root-compromised host cannot prove its own cleanliness: use a trusted external/recovery vantage or leave the result unresolved. This response still requires separate patching, artifact cleanup and revocation of any exposed credentials.
Compromised Durable Application Session & Agent State Teardown
High
If the attacker created a backend Tool, freeze Tool creation, updates and use, preserve its exact ID/content/version, and remove that registration through a version-checked maintenance adapter. Open WebUI provides authorized exact-ID deletion and local cache clearing; this is not native compare-and-swap or fleet-wide cache invalidation. Independently reconcile the authoritative database and every worker/replica cache, confirm harmless dispatch cannot resolve the removed Tool, and retain an external tombstone/audit record against stale restoration. Avoid normal listing paths that import untrusted Tool modules. Deletion alone does not stop running Python or invalidate a stolen session.
What Defenders Should Do Now
Deploy a currently supported build containing the fix and verify the frontend assets actually served to users. Disable unused Direct Connections and remove untrusted endpoints. Test a harmless execute-event fixture: no JavaScript marker may run, while normal streaming remains usable.
Remove workspace.tools from identities that do not need backend code execution, including group overrides. Test denial at the actual backend API with a non-admin identity. Review administrators separately. Constrain the backend runtime with non-root privileges and minimal mounts; these controls do not prevent browser-token disclosure.
After token exposure, use the documented account-wide Sign out all devices operation if the deployed version supports it, then verify that the old token fails on every replica and clean login works. Current documentation says account-wide revocation is database-backed and does not require Redis. Single-session sign-out is different: it needs Redis, and its revocation check can fail open during a Redis outage.
API keys remain valid after account-wide sign-out and need separate removal or regeneration. Do not casually rotate WEBUI_SECRET_KEY as a substitute: it also derives encryption for other features, and the current MFA configuration can prevent startup after rotation. Preserve evidence and investigate malicious Tools or backend changes independently.
Conclusion
Patch the boundary that turns model-server events into browser code, restrict backend Tool authority and invalidate stolen sessions through a mechanism the deployed verifier actually enforces. An MCP filter or a backend-only network rule does not cover this browser SSE path. If native execution has already occurred, exact-process termination on a supported managed Linux host is a separate response step; patching or revoking a credential does not stop that execution. Where an attacker registered a Tool, remove its durable registration and all dispatch caches independently of runtime and session eviction.