Open WebUI Same-Origin XSS via Terminal Port Preview
An insecure sandbox configuration in the Open WebUI terminal port preview feature allows authenticated users to execute arbitrary JavaScript in the application's origin, leading to session token theft and account takeover.
CVE search metadata
CVE search record: CVE-2026-87995. Severity: high. CVSS: 8.7. KEV: no. Product: Open WebUI (0.8.11-0.11.0), Open WebUI (0.9.6 - 0.11.0), Open WebUI (0.10.0-0.11.0), Open WebUI (< 0.11.1), Open WebUI (0.9.0 - 0.11.0), Open WebUI (>= 0.6.41, < 0.11.1). Brief: Open WebUI Same-Origin XSS via Terminal Port Preview. Brief link: https://feed.craftedsignal.io/briefs/2026-09-open-webui-xss/
What's new
- 1. added coverage for Open WebUI (>= 0.6.41, < 0.11.1) Sep 11, 00:54 via ghsa
- 2. added detection rule: Detect Excessive Unauthenticated OIDC Logout Requests Sep 11, 00:54 via ghsa
- 3. added detection rule: Detects CVE-2026-87999 Exploitation - Unauthorized SSRF Attempt Sep 10, 18:54 via ghsa
- 4. added detection rule: Detect CVE-2026-87998 Exploitation - Unauthorized Knowledge Base Deletion Sep 10, 18:53 via ghsa
- 5. added coverage for Open WebUI (0.9.6 - 0.11.0) Sep 10, 18:53 via ghsa
Open WebUI versions 0.8.11 through 0.11.0 contain a high-severity Cross-Site Scripting (XSS) vulnerability (CVE-2026-87995) within the terminal port-preview component. The application renders content from a terminal connection inside an iframe; however, the sandbox attribute for this iframe incorrectly included the allow-same-origin directive. Because the terminal proxy is served from the same origin as the primary application, this configuration effectively disables iframe isolation.
An authenticated attacker with access to a shared terminal server can host a malicious HTML page on a port. When an unsuspecting user views this port via the Open WebUI terminal preview, the attacker-supplied script executes within the application origin. This permits the script to access localStorage, extract sensitive session tokens, and perform actions on behalf of the victim, leading to full account takeover. The vulnerability persists unless the user has manually configured restrictive Content Security Policy (CSP) headers or utilized a terminal connection with an external URL, which forces a cross-origin boundary.
Attack Chain
- Attacker obtains authenticated access to a shared terminal server environment managed by the Open WebUI instance.
- Attacker deploys a malicious HTML file or script on a reachable port within that terminal server environment.
- Attacker waits for a victim user (potentially an administrator) to open the Open WebUI file navigator.
- Victim user navigates to the port list and selects the attacker-controlled port for preview.
- Open WebUI renders the attacker's content within an iframe using the insecure
allow-same-originandallow-scriptssandbox flags. - Malicious script executes in the parent application context and accesses
window.parent.localStorage. - Script exfiltrates the victim's session token to an attacker-controlled external server.
- Attacker uses the stolen session token to assume the victim's identity and perform unauthorized operations, such as executing server-side code via Functions.
Impact
Successful exploitation results in total account takeover of the victim. If the compromised victim holds administrative privileges or permissions related to workspace.functions, the attacker can escalate to server-side code execution. The attack is limited to deployments where TERMINAL_SERVER_CONNECTIONS are configured and shared between users.
Recommendation
Upgrade Open WebUI to version 0.11.1 or later immediately to resolve CVE-2026-87995. Ensure that the terminalPreviewAllowSameOrigin user setting remains disabled, which is the default behavior in the patched version. For administrators who cannot upgrade immediately, verify that a restrictive Content Security Policy (CSP) is applied via the TERMINAL_PROXY_HEADERS configuration to mitigate the risk of script exfiltration.
Immediate actions
Upgrade Open WebUI to version 0.11.1
Mitigations
Configure restrictive CSP headers via TERMINAL_PROXY_HEADERS
CVE-2026-87995
Detection coverage 3
Detect CVE-2026-87998 Exploitation - Unauthorized Knowledge Base Deletion
highDetects potentially unauthorized attempts to delete knowledge bases by monitoring DELETE requests to the /api/v1/knowledge endpoint.
Detects CVE-2026-87999 Exploitation - Unauthorized SSRF Attempt
highDetects unauthorized SSRF attempts targeting common internal/platform IP addresses via the Open WebUI web retrieval API endpoint.
Detect Excessive Unauthenticated OIDC Logout Requests
highDetects high-frequency POST requests to the back-channel logout endpoint from a single source, which may indicate exploitation of CVE-2026-87011
Detection queries are available on the platform. Get full rules →