/

CVE-2026-61891

Severity:

HIGH RISK

(7.5)

Path Traversal (CWE-22) in Theia Filesystem Backend

CVE-2026-61891

Analyzed

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22, CWE-36, CWE-200, CWE-306

Impact:

Sensitive Information Disclosure

Severity:

HIGH RISK

(7.5)

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 filesystem backend can convert client-supplied URIs into filesystem paths without restricting them to the workspace or an approved root. In browser-based deployments, missing HTTP token enforcement may allow an unauthenticated client to read files accessible to the backend process, including sensitive credentials and system data.

Affected context

The issue occurs in Eclipse Theia deployments using the @theia/filesystem backend and its HTTP file endpoints. Risk is higher in browser-based deployments where authentication is enforced for WebSocket upgrades but is not consistently applied to the related HTTP middleware. Electron mode uses a separate security-token mechanism and is not affected through this specific path.

Exploit preconditions

  • Attack surface: HTTP file-download and file-operation endpoints exposed by the filesystem backend
  • Required access: Network reachability to the Theia server; a valid connection token may not be required in affected browser deployments
  • Trigger point: Processing a client-supplied URI as a filesystem path
  • Why exploitation is possible: The backend does not consistently confine resolved paths to the workspace or an approved allow-listed root, and HTTP token enforcement may be bypassed

Why this happens

The underlying issue is insufficient path boundary enforcement combined with inconsistent authentication middleware coverage. Client-controlled URI values are translated into filesystem paths without reliably verifying that the resulting path remains within an authorized workspace or root directory. This behavior maps primarily to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, with related exposure involving external path references, missing authentication, and information disclosure.

Potential impact

  • An unauthenticated client may read files accessible to the backend process
  • Source code, configuration data, tokens, or private keys could be disclosed
  • System metadata and environment-specific files may be exposed
  • Disclosure could support follow-on compromise of connected services or accounts
  • The confidentiality of workspace and host data may be reduced

General mitigation guidance

Mitigation generally focuses on enforcing both authorization and filesystem boundaries for every file operation.

Common defensive patterns include:

  • Resolve requested paths against a permitted root and reject paths that escape it
  • Prefer opaque, server-managed file identifiers over unrestricted client-supplied paths
  • Apply authentication and authorization consistently to HTTP endpoints, not only WebSocket upgrades
  • Maintain explicit allow-lists for readable directories and file types where practical
  • Run the backend with a dedicated low-privilege account and restrict filesystem permissions
  • Avoid exposing host-mounted secrets or sensitive directories to the backend process
  • Treat Electron and browser transport paths as separate security boundaries and test both

How teams detect issues like this

Organizations can look for:

  • Static analysis rules identifying client-controlled path construction, filesystem reads, and missing canonical-path boundary checks
  • Code review signals such as direct URI-to-path conversion, prefix checks performed before normalization, or authorization applied only to WebSocket routes
  • Integration tests that attempt access outside the workspace and verify rejection for both authenticated and unauthenticated HTTP requests
  • Web-server and application logs showing unexpected file endpoint requests, traversal patterns, or access to system paths
  • Policy enforcement requiring explicit root confinement and authentication middleware on every file-serving route

Automated security review tools may help identify path-handling and missing-access-control patterns, but deployment-specific testing remains important.

Sources

SourceLink
github.comgithub.com/eclipse-theia/theia/security/advisories/GHSA-qqc8-9538-25v4
gitlab.eclipse.orggitlab.eclipse.org/security/cve-assignment/-/work_items/176
gitlab.eclipse.orggitlab.eclipse.org/security/vulnerability-reports/-/issues/570

Frequently asked

questions

In affected browser-based deployments, an attacker with network access to the Theia HTTP service may be able to access the file endpoints without a valid connection token.

The attacker generally needs only reachability to the exposed HTTP service when token enforcement is missing. The files must also be readable by the backend process.

Enforce authentication and authorization on every relevant HTTP request, then resolve and validate paths so they remain within an explicitly permitted root.

Treat all client-supplied paths as untrusted, use canonical-path boundary checks, minimize backend filesystem privileges, and test authentication consistently across HTTP and WebSocket interfaces.

Find out what's already
exploitable in your codebase.