{"id":"GHSA-78g8-vm3p-97c6","summary":"Theia WebSocket Origin Validation Bypass Enables Terminal Command Execution","details":"### Impact\n\nThe 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).\n\nAdditionally, the Socket.IO integration replaces the trusted `Origin` header with a client-supplied `fix-origin` header, which an attacker can control or omit entirely.\n\nA foreign-origin webpage can exploit this to:\n1. Connect to the `/services` WebSocket namespace from a cross-origin context\n2. Open the `shell-terminal` RPC channel and invoke terminal creation\n3. Connect to the resulting terminal data channel\n4. Execute arbitrary commands and read their output\n\nThis 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.\n\nAny user running Theia's browser application is impacted, regardless of whether `THEIA_HOSTS` is configured.\n\n**Affected code paths:**\n- `packages/core/src/node/hosting/ws-origin-validator.ts`: fail-open when `Origin` is absent or `THEIA_HOSTS` is unset\n- `packages/core/src/node/messaging/websocket-endpoint.ts`: overwrites `Origin` with attacker-controllable `fix-origin` header\n- `packages/terminal/src/node/terminal-backend-module.ts`: registers terminal RPC with no auth gate\n- `packages/terminal/src/node/shell-terminal-server.ts`: `create()` accepts remote-controlled options into PTY spawn\n\n### Workarounds\n\n- **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.\n- **Network isolation**: Do not expose the Theia backend to untrusted networks. Use a reverse proxy with proper authentication in front of the WebSocket endpoint.\n- **Disable the terminal service**: If terminal functionality is not required, exclude `@theia/terminal` from your Theia application build.\n\n### Resources\n\n- [Eclipse Foundation Security Handbook: Embargoes](https://eclipse-csi.github.io/security-handbook/vulnerabilities/embargoes.html#developing-a-fix-under-an-embargo)\n- [Theia `THEIA_HOSTS` documentation](https://github.com/eclipse-theia/theia/tree/master/packages/core#environment-variables)\n\n### Credit\n\n- [ANWAR AYOOB] : Anwar Ayoob (`@blackmask` on Eclipse GitLab, https://github.com/AnwarAyoob on GitHub):  finder","aliases":["CVE-2026-10054"],"modified":"2026-12-03T01:15:07.801806041Z","published":"2026-12-03T01:03:58Z","database_specific":{"severity":"HIGH","github_reviewed":true,"github_reviewed_at":"2026-12-03T01:03:58Z","nvd_published_at":"2026-07-03T11:16:26Z","cwe_ids":["CWE-1385","CWE-306"]},"references":[{"type":"WEB","url":"https://github.com/eclipse-theia/theia/security/advisories/GHSA-78g8-vm3p-97c6"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-10054"},{"type":"WEB","url":"https://github.com/eclipse-theia/theia/commit/1635004f996d7a50fa7fb758563c29a63b900f2d"},{"type":"PACKAGE","url":"https://github.com/eclipse-theia/theia"},{"type":"WEB","url":"https://github.com/eclipse-theia/theia/releases/tag/v1.73.0"}],"affected":[{"package":{"name":"@theia/core","ecosystem":"npm","purl":"pkg:npm/%40theia/core"},"ranges":[{"type":"SEMVER","events":[{"introduced":"1.8.1"},{"fixed":"1.73.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-78g8-vm3p-97c6/GHSA-78g8-vm3p-97c6.json"}},{"package":{"name":"@theia/terminal","ecosystem":"npm","purl":"pkg:npm/%40theia/terminal"},"ranges":[{"type":"SEMVER","events":[{"introduced":"1.8.1"},{"fixed":"1.73.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-78g8-vm3p-97c6/GHSA-78g8-vm3p-97c6.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"}]}