/

CVE-2026-60009

Severity:

HIGH RISK

(8.8)

Path Traversal (CWE-22) in Eclipse Theia File Upload

CVE-2026-60009

Analyzed

Vulnerability type

Category:

Path Traversal and Arbitrary File Write

CWE:

CWE-22, CWE-73, CWE-306, CWE-352

Impact:

Unauthenticated Arbitrary File Write and Potential Remote Code Execution

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 filesystem backend may allow an unauthenticated client to write an uploaded file to an attacker-selected absolute path outside the workspace. In browser-based deployments, a cross-origin request can trigger this behavior without authentication, potentially enabling remote code execution when the backend process can overwrite a startup-executed or otherwise sensitive file.

Affected context

The issue occurs in Eclipse Theia deployments that enable the @theia/filesystem backend and expose the HTTP file-upload endpoint. It is particularly relevant to browser-based deployments where authentication tokens are enforced for WebSocket upgrades but are not rejected for the associated HTTP request path. Electron mode uses a separate security-token mechanism and is not affected through this specific path.

Exploit preconditions

  • Attack surface: HTTP POST /file-upload endpoint accepting multipart form data
  • Required access: No authenticated Theia session is required in the affected browser deployment model
  • Trigger point: File-upload handling when the supplied uri identifies the destination path
  • Why exploitation is possible: The backend uses an attacker-controlled absolute path without workspace confinement and performs an overwrite-capable filesystem move
  • Additional condition: The backend process must have write permission for the selected destination
  • Cross-origin consideration: The multipart request type can be sent cross-origin without requiring a CORS preflight

Why this happens

The underlying flaw combines insufficient path validation with missing authorization on a file-write operation. The upload handler treats a client-controlled absolute URI as a trusted destination and does not constrain it to the workspace or another approved directory before performing an overwrite-capable move. This maps primarily to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, with related weaknesses involving external control of file names or paths, missing authentication, and cross-site request forgery exposure.

Potential impact

  • An unauthenticated attacker may overwrite files outside the intended workspace
  • The backend process may be forced to modify configuration, credential, or application files
  • Startup-executed files could be altered, which may enable remote code execution
  • The application environment, host, or dependent services could be compromised
  • Existing files may be destroyed or replaced, affecting availability and integrity

General mitigation guidance

Mitigation generally focuses on enforcing authorization and restricting every upload destination to an explicitly approved directory.

Common defensive patterns include:

  • Require authentication and authorization before accepting file-upload requests
  • Enforce the connection or session token consistently for HTTP requests, not only WebSocket upgrades
  • Resolve and canonicalize destinations, then verify they remain within an allowed workspace or upload root
  • Reject absolute paths, traversal components, symlink escapes, and destinations outside the configured boundary
  • Avoid overwrite-by-default behavior and apply narrowly defined replacement policies
  • Use dedicated low-privilege service accounts with minimal filesystem write permissions
  • Apply CSRF protections and restrictive origin policies as defense-in-depth for browser-accessible endpoints
  • Store uploads in isolated, non-executable locations and separate them from startup or configuration files

How teams detect issues like this

Organizations can look for:

  • Static analysis findings involving client-controlled paths passed to filesystem move, copy, write, or rename operations
  • Code review signals such as absolute-path acceptance, missing canonical-path checks, and overwrite-enabled file operations
  • Endpoint inventories identifying unauthenticated multipart upload handlers
  • Integration tests that verify token enforcement for HTTP requests and rejection of destinations outside the workspace
  • Runtime monitoring for unexpected writes by the Theia backend process outside approved directories
  • Policy checks requiring authentication, origin controls, and least-privilege filesystem access for upload services

Automated security review tools can help identify path-construction and authorization patterns, but deployment-level testing remains important.

Sources

SourceLink
github.comgithub.com/eclipse-theia/theia/security/advisories/GHSA-62f6-wcvg-54h3
gitlab.eclipse.orggitlab.eclipse.org/security/cve-assignment/-/work_items/177
gitlab.eclipse.orggitlab.eclipse.org/security/vulnerability-reports/-/issues/595
gitlab.eclipse.orggitlab.eclipse.org/security/vulnerability-reports/-/work_items/595

Frequently asked

questions

Yes, in affected browser-based deployments the HTTP upload endpoint may be reachable remotely and can accept a cross-origin multipart request without an authenticated session.

The attacker generally needs network reachability to the Theia HTTP service, but not a valid Theia connection token or authenticated account through this path. The target backend process must also have write permission for the selected file.

Require authentication for the upload operation and enforce canonical-path validation that confines all destinations to a dedicated, approved directory. Overwrite behavior should be disabled or tightly controlled.

Treat uploaded paths as untrusted input, apply authorization consistently across HTTP and WebSocket interfaces, test for workspace escapes and symlink bypasses, and run the backend with minimal filesystem privileges.

Find out what's already
exploitable in your codebase.