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:
/services WebSocket namespace from a cross-origin contextshell-terminal RPC channel and invoke terminal creationThis 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 when Origin is absent or THEIA_HOSTS is unsetpackages/core/src/node/messaging/websocket-endpoint.ts: overwrites Origin with attacker-controllable fix-origin headerpackages/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 spawnTHEIA_HOSTS: Configure the THEIA_HOSTS environment variable to a strict allowlist of expected host:port values (e.g., THEIA_HOSTS=localhost:3000). Note: this alone does not fully mitigate the issue due to the fix-origin header override, but it reduces the attack surface.@theia/terminal from your Theia application build.@blackmask on Eclipse GitLab, https://github.com/AnwarAyoob on GitHub): finder{
"cwe_ids": [
"CWE-1385",
"CWE-306"
],
"github_reviewed": true,
"github_reviewed_at": "2026-12-03T01:03:58Z",
"nvd_published_at": "2026-07-03T11:16:26Z",
"severity": "HIGH"
}