CVE-2026-10054: Theia WebSocket Origin Validation Bypass Enables Terminal Command Execution
The Theia browser backend exposes privileged terminal RPC services over WebSocket (/services/shell-terminal, /services/terminals/:id) without service-level authentication or authorization. WebSocket origin validation in @theia/core is fail-open: connections are accepted when the Origin header is missing or when no THEIA_HOSTS allowlist is configured (the default).
Additionally, the Socket.IO integration replaces the trusted Origin header with a client-supplied fix-origin header, which an attacker can control or omit entirely.
A foreign-origin webpage can exploit this to:
- Connect to the
/servicesWebSocket namespace from a cross-origin context - Open the
shell-terminalRPC channel and invoke terminal creation - Connect to the resulting terminal data channel
- Execute arbitrary commands and read their output
This affects both local development setups (drive-by attack when a user visits a malicious page) and hosted/tunneled deployments where the backend WebSocket is reachable without strong external authentication.
Any user running Theia’s browser application is impacted, regardless of whether THEIA_HOSTS is configured.
Affected code paths:
packages/core/src/node/hosting/ws-origin-validator.ts: fail-open whenOriginis absent orTHEIA_HOSTSis unsetpackages/core/src/node/messaging/websocket-endpoint.ts: overwritesOriginwith attacker-controllablefix-originheaderpackages/terminal/src/node/terminal-backend-module.ts: registers terminal RPC with no auth gatepackages/terminal/src/node/shell-terminal-server.ts:create()accepts remote-controlled options into PTY spawn
References
Code Behaviors & Features
Detect and mitigate CVE-2026-10054 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →