/

CVE-2026-10054

Severity:

HIGH RISK

(8.8)

Missing Terminal RPC Auth (CWE-306) in Eclipse Theia

CVE-2026-10054

Deferred

Vulnerability type

Category:

Missing Authentication for Critical Functionality

CWE:

CWE-306, CWE-1385

Impact:

Remote Code Execution via Browser-Exposed Terminal

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Eclipse Theia's browser backend exposes privileged terminal RPC endpoints over WebSocket without robust, service-level authentication and with weak origin validation.

A malicious website opened in a user's browser can silently connect to these endpoints, spawn OS shells, run arbitrary commands, and read their output whenever a Theia instance is reachable and the browser session is active.

Affected context

This vulnerability appears in Eclipse Theia deployments where the browser backend is reachable from a user's browser and the default origin and host validation are in place.

It is most relevant for:

  • Local developer setups where Theia runs on localhost and users browse untrusted websites
  • Hosted or tunneled IDE instances without strong external authentication or strict reverse proxy controls
  • Environments relying solely on Theia's default WebSocket origin checks and fix-origin behavior

In these contexts, the /services WebSocket namespace can be opened from a foreign-origin page, and terminal-related RPC calls are accepted without additional per-service authentication.

Exploit preconditions

  • Attack surface: Browser-exposed WebSocket endpoints, specifically:
  • /services/shell-terminal
  • /services/terminals/:id

accessible via the Theia backend.

  • Required access: The attacker must:
  • Convince a user to open a malicious web page in a browser that can also reach the Theia instance, or
  • Be able to run JavaScript in a tab that shares network access to the target Theia backend.
  • Trigger point:
  • The malicious page initiates a Socket.IO connection to the /services namespace.
  • The backend accepts the connection because:
  • Origin checks are fail-open when the Origin header is missing, or
  • No THEIA_HOSTS allowlist is configured (default), and/or
  • The fix-origin header supplied by the client is trusted.
  • The attacker then issues RPC calls to create and attach to a terminal.
  • Why exploitation is possible:
  • Critical terminal management RPC is exposed without service-level authentication (CWE-306).
  • WebSocket origin validation is implemented in a fail-open manner and can be bypassed or controlled through fix-origin (CWE-1385).
  • The backend treats the established WebSocket session as implicitly trusted and permits shell creation and IO without additional authorization checks.

Why this happens

The underlying flaw is a combination of missing authentication for sensitive backend services and overly permissive origin validation.

The terminal RPC endpoints, which directly map to OS-level shell creation and interaction, are exposed over WebSocket but do not enforce their own authentication or authorization, falling under CWE-306: Missing Authentication for Critical Functionality.

Concurrently, WebSocket origin checks are designed in a fail-open fashion, accepting connections when the Origin header is absent or when no host allowlist is configured, and they rely on a client-controlled fix-origin header.

This design aligns with CWE-1385: Incorrect Authorization and weakens cross-origin protections, allowing untrusted web origins to obtain the same privileges as the trusted Theia frontend.

Together, these patterns mean trust is delegated to network reachability and weak origin signals rather than explicit, per-session authentication and tightly scoped authorization.

Potential impact

  • An attacker-controlled web page may spawn new OS shell terminals on the victim's machine or on a hosted Theia server.
  • The attacker could execute arbitrary OS commands within those terminals and read all resulting output.
  • The attacker could access project files, environment variables, and secrets reachable from the terminal context.
  • The attacker can potentially pivot to other internal services or systems accessible from the compromised environment.
  • In shared or multi-tenant deployments, one user's session could be abused to interfere with projects or infrastructure belonging to others.

General mitigation guidance

Effective mitigation centers on enforcing strong, explicit authentication for critical backend services and tightening origin trust boundaries.

Useful patterns include:

  • Service-level authentication and authorization:
  • Treat terminal creation, attachment, and command IO as high-risk operations that require a validated user identity and session.
  • Introduce middleware that checks a signed, HttpOnly cookie or bearer token before routing RPC calls to terminal handlers.
  • Attach authorization policies to terminal sessions (e.g., per-user ownership, per-project scope) instead of assuming any connected client is trusted.
  • Strict origin and host validation:
  • Implement default-deny origin validation for WebSockets, only allowing the official Theia frontend origin or an explicit, well-maintained allowlist.
  • Avoid trusting client-supplied substitute headers like fix-origin; rely on server-side, framework-provided origin metadata.
  • Connection token and session management:
  • Gate both HTTP and WebSocket access on short-lived, cryptographically secure tokens bound to the browser session.
  • Use SameSite=Strict; HttpOnly cookies for these tokens to reduce cross-site request and cross-origin initiation risks.
  • Attack surface reduction:
  • Disable or restrict shell terminal features in environments where they are not strictly required.
  • Constrain terminal environments with least privilege, limiting filesystem and network access where feasible.
  • Configuration-hardening:
  • Ship secure-by-default host and origin settings that must be explicitly relaxed, with clear warnings.
  • Provide centralized configuration for allowed hosts/origins, and ensure misconfiguration fails closed rather than open.

How teams detect issues like this

Detection can focus on both code-level weaknesses and runtime anomalies:

  • Static analysis and code review:
  • Flag backend routes or WebSocket namespaces that expose command execution, shell, or terminal capabilities without explicit authentication/authorization checks.
  • Search for origin or host validation logic that:
  • Accepts missing Origin headers without fallback safeguards.
  • Relies on client-controlled headers (such as custom fix-origin headers) for trust decisions.
  • Identify use of Socket.IO or similar frameworks where authentication middleware is not uniformly applied.
  • Configuration and policy enforcement:
  • Enforce policies requiring default-deny origin checks and explicit THEIA_HOSTS-style allowlists in deployment templates.
  • Use infrastructure-as-code checks or policy-as-code tools to ensure Theia instances are not exposed to untrusted networks without a fronting authentication layer.
  • Runtime monitoring and logging:
  • Log terminal creation and attachment events with user identity, origin, and client IP information.
  • Monitor for anomalous patterns, such as terminals being created from unrecognized origins or at unexpected times.
  • Integrate logs into SIEM systems to correlate suspicious WebSocket connections with other security signals.
  • Automated testing:
  • Incorporate security regression tests that attempt cross-origin WebSocket connections to Theia backends.
  • Use dynamic analysis tools to verify that unauthorized clients cannot create or attach to terminals.

Sources

SourceLink
github.comgithub.com/eclipse-theia/theia/security/advisories/GHSA-78g8-vm3p-97c6
gitlab.eclipse.orggitlab.eclipse.org/security/vulnerability-reports/-/work_items/376

Frequently asked

questions

The vulnerability is exploitable wherever a user's browser can reach an accessible Theia backend and the user visits a malicious website.

It does not require direct network access to the backend by the attacker; instead, it abuses the victim's browser as a bridge via cross-origin WebSocket connections.

No explicit credentials are required if the Theia instance relies on its default origin behavior and lacks strong external authentication.

Once the browser has a reachable, unauthenticated Theia backend, a foreign-origin page can initiate terminal RPC without presenting a user identity.

The safest pattern is to enforce authenticated, token-based access for all sensitive services (including terminal RPC) and to couple this with strict same-origin or allowlisted-origin checks.

This typically involves requiring a session-bound, HttpOnly connection token for all HTTP and WebSocket requests and failing closed when tokens or origins do not match expectations.

Future prevention depends on adopting security-by-design principles:

  • Treat any capability that can execute OS commands as an administrative interface requiring strong authentication and explicit authorization.
  • Implement default-deny origin and host validation, avoiding reliance on client-controlled headers.
  • Standardize middleware that enforces session tokens and access control for all WebSocket namespaces and RPC endpoints.
  • Regularly review and test cross-origin and WebSocket behavior as part of security assessments and CI pipelines.
Find out what's already
exploitable in your codebase.