cvelo
P2 · HighCVSS 8.8EPSS 0.2%

Theia WebSocket Origin Validation Bypass Enables Terminal Command Execution

  • CVE-2026-10054
  • GHSA-78g8-vm3p-97c6
  • EUVD-2026-41529

Description

Show the whole description

### Impact 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: 1. Connect to the `/services` WebSocket namespace from a cross-origin context 2. Open the `shell-terminal` RPC channel and invoke terminal creation 3. Connect to the resulting terminal data channel 4. 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 when `Origin` is absent or `THEIA_HOSTS` is unset - `packages/core/src/node/messaging/websocket-endpoint.ts`: overwrites `Origin` with attacker-controllable `fix-origin` header - `packages/terminal/src/node/terminal-backend-module.ts`: registers terminal RPC with no auth gate - `packages/terminal/src/node/shell-terminal-server.ts`: `create()` accepts remote-controlled options into PTY spawn ### Workarounds - **Set `THEIA_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. - **Network isolation**: Do not expose the Theia backend to untrusted networks. Use a reverse proxy with proper authentication in front of the WebSocket endpoint. - **Disable the terminal service**: If terminal functionality is not required, exclude `@theia/terminal` from your Theia application build. ### Resources - [Eclipse Foundation Security Handbook: Embargoes](https://eclipse-csi.github.io/security-handbook/vulnerabilities/embargoes.html#developing-a-fix-under-an-embargo) - [Theia `THEIA_HOSTS` documentation](https://github.com/eclipse-theia/theia/tree/master/packages/core#environment-variables) ### Credit - [ANWAR AYOOB] : Anwar Ayoob (`@blackmask` on Eclipse GitLab, https://github.com/AnwarAyoob on GitHub): finder

Text from the GitHub Advisory record.

Recommendation

Taken from the version ranges the sources state. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.

Affected

  • The Eclipse Foundation Eclipse Theia

    Affected versionsFixed in
    from 1.8.1 to before 1.73.01.73.0
  • @theia/corenpm

    Affected versionsFixed in
    from 1.8.1 to before 1.73.01.73.0
  • @theia/terminalnpm

    Affected versionsFixed in
    from 1.8.1 to before 1.73.01.73.0

Product versions from the ENISA EUVD record.

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.