/

CVE-2026-82217

Severity:

HIGH RISK

(8.8)

Path Traversal (CWE-22) in Eclipse Theia Agent Mode

CVE-2026-82217

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Unauthorized File Modification and Potential 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

A path traversal vulnerability in Eclipse Theia's Agent Mode file-change tools allows model-influenced paths to access files outside the configured workspace. If an attacker can steer model output through indirect prompt injection, the Theia backend may write, replace, or delete files with the backend user's operating-system privileges, potentially enabling code execution.

Affected context

The issue occurs in Eclipse Theia versions that provide Agent Mode file-change operations without enforcing workspace containment for model-supplied paths. Risk is higher when Agent Mode applies file changes without confirmation and the backend process can access sensitive user or host-executed files. The vulnerability depends on model output reaching file-operation helpers without adequate path normalization and boundary checks.

Exploit preconditions

  • Attack surface: Theia Agent Mode file-change tools in the backend
  • Required access: Access to an Agent Mode workflow or another way to influence the model's generated file-operation arguments
  • Trigger point: A write, replacement, state, or delete helper processes a model-supplied path
  • Why exploitation is possible: The path is resolved without reliably confirming that the resulting location remains inside the authorized workspace
  • Additional conditions: The backend operating-system user must have write or delete permissions for the targeted location; indirect prompt injection may provide a route for influencing model output

Why this happens

The underlying bug is improper restriction of file paths to an intended workspace boundary. Relative traversal, absolute locations, and home-directory expansion can cause a path resolver to produce a destination outside the authorized root when containment is not checked after normalization.

This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly called path traversal. The insecure pattern is trusting a user- or model-influenced path as a workspace-relative filename without canonicalizing it and verifying that the final destination remains within the permitted directory.

Potential impact

  • An attacker may modify or delete files outside the workspace.
  • Sensitive configuration, credential, or source files could be overwritten or removed.
  • Shell startup or other host-executed files could be changed.
  • The backend process could execute attacker-controlled content under its operating-system privileges.
  • The development environment or connected systems could be further compromised.

General mitigation guidance

Mitigation typically focuses on enforcing a strong filesystem trust boundary for every Agent Mode file operation.

Common defensive patterns include:

  • Resolving and canonicalizing paths before access, then enforcing containment within an approved workspace root.
  • Rejecting absolute paths, traversal components, home-directory expansion, symlink escapes, and ambiguous path forms unless explicitly required and controlled.
  • Applying the same validation to write, replace, delete, and state-management helpers.
  • Using allowlisted workspace roots and capability-limited file APIs rather than general filesystem access.
  • Requiring explicit user confirmation for sensitive or out-of-workspace operations.
  • Running the backend with least-privilege filesystem permissions and isolating it from host-sensitive locations.
  • Treating model output as untrusted input and reducing its authority over filesystem operations.

How teams detect issues like this

Organizations can detect this class of issue through:

  • Static analysis rules that flag file APIs receiving model-, user-, or tool-derived paths without canonicalization and containment checks.
  • Code review checks for path joining without post-resolution boundary validation.
  • Tests covering relative traversal, absolute paths, home-directory expansion, symbolic links, and equivalent normalized paths.
  • Runtime policy enforcement that records and blocks file operations outside approved workspace roots.
  • Audit monitoring for Agent Mode writes or deletes affecting startup files, SSH configuration, or other sensitive locations.
  • Automated security review tools that identify unrestricted filesystem access in AI tool integrations.

Sources

SourceLink
github.comgithub.com/eclipse-theia/theia/commit/28da106c254
gitlab.eclipse.orggitlab.eclipse.org/security/vulnerability-reports/-/work_items/624

Frequently asked

questions

Exploitability depends on how Theia is deployed and exposed. An attacker generally needs access to an Agent Mode workflow or an indirect prompt-injection path that can influence the model's file-operation output; direct network reachability alone may not be sufficient.

The relevant requirement is the ability to cause Agent Mode to process attacker-influenced file paths. The resulting impact also depends on the permissions of the Theia backend operating-system user.

Treat every model-supplied path as untrusted, canonicalize it, and enforce that the final target remains within an approved workspace root before any filesystem operation. Apply this consistently to writes, replacements, and deletions.

Use capability-limited file tools, require confirmation for sensitive actions, run backends with least privilege, test path-boundary cases, and enforce runtime policies that prevent access outside authorized directories.

Find out what's already
exploitable in your codebase.