Vulnerabilities in pkg:npm/@theia/ai-code-completion

PACKAGE
Advisory Identifier: GHSA-m973-pr9r-hp2w
Advisory Summary

CVE-2026-46580 is a HIGH [eclipse theia] indirect prompt injection vulnerability (CWE-829: Inclusion of Functionality from Untrusted Control Sphere) affecting @theia/ai chat ui libraries in the npm ecosystem. The issue involves [eclipse theia] indirect prompt injection via auto-loaded workspace prompt template files in ai chat. Remediation is available by upgrading affected packages to version 1.71.0.

3 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@theia/ai-code-completion

3 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@theia/ai-code-completion. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-m973-pr9r-hp2w CVE-2026-46580 HIGH [Eclipse Theia] Indirect Prompt Injection via Auto-Loaded Workspace Prompt Template Files in AI Chat
GHSA-3jww-hxqj-wfq2 CVE-2026-44688 HIGH [Eclipse Theia] Indirect Prompt Injection via Adversarial Workspace File and Directory Names in AI Chat
GHSA-qwjm-9c66-w4q4 CVE-2026-22551 MODERATE [Eclipse Theia] Data Exfiltration via Markdown Image Rendering in AI Chat

CVE-2026-46580 at a Glance

CVE Identifier CVE-2026-46580
GHSA Identifier GHSA-m973-pr9r-hp2w
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-829: Inclusion of Functionality from Untrusted Control Sphere
Affected Product @theia/ai chat ui
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-46580

To remediate this vulnerability, upgrade all affected @theia/ai chat ui dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@theia/ai-chat-ui fixed: 1.71.0
npm install @theia/ai-chat-ui@1.71.0
@theia/ai-chat fixed: 1.71.0
npm install @theia/ai-chat@1.71.0
@theia/ai-claude-code fixed: 1.71.0
npm install @theia/ai-claude-code@1.71.0
@theia/ai-code-completion fixed: 1.71.0
npm install @theia/ai-code-completion@1.71.0
@theia/ai-core fixed: 1.71.0
npm install @theia/ai-core@1.71.0
@theia/ai-editor fixed: 1.71.0
npm install @theia/ai-editor@1.71.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @theia/ai-chat-ui

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-46580, inspect your project dependencies using npm:

npm ls @theia/ai-chat-ui

Analyze the terminal output to locate any version of @theia/ai chat ui in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.71.0), your application is affected.

Note: The npm ls @theia/ai-chat-ui command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-829: Inclusion of Functionality from Untrusted Control Sphere, where the product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere. In @theia/ai chat ui, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

In Eclipse Theia versions prior to 1.71.0, files matching the pattern .prompts/*.prompttemplate in a workspace were automatically loaded and could override or extend the AI agent's system prompts. An attacker could craft a malicious repository containing prompt template files that, when the workspace was opened in Theia, replaced the AI's system instructions with attacker-controlled content (indirect prompt injection). Combined with other AI chat features available in untrusted workspaces, this enabled attack chains leading to data exfiltration via Markdown image rendering or arbitrary command execution via task definitions.

CVE-2026-46580 Affected @theia/ai chat ui Versions

6 component(s)
Fixed Versions:
1.71.0
Product / Package Ecosystem Affected Versions Fixed Version
@theia/ai-chat-ui
npm
< 1.71.0
1.71.0
@theia/ai-chat
npm
< 1.71.0
1.71.0
@theia/ai-claude-code
npm
< 1.71.0
1.71.0
@theia/ai-code-completion
npm
< 1.71.0
1.71.0
@theia/ai-core
npm
< 1.71.0
1.71.0
@theia/ai-editor
npm
< 1.71.0
1.71.0

References

Frequently Asked Questions

What is CVE-2026-46580?
CVE-2026-46580 is a security vulnerability in @theia/ai chat ui involving [Eclipse Theia] Indirect Prompt Injection via Auto-Loaded Workspace Prompt Template Files in AI Chat under CWE-829: Inclusion of Functionality from Untrusted Control Sphere.
Which @theia/ai chat ui versions are affected?
Affected versions include releases prior to 1.71.0 across affected packages: @theia/ai-chat-ui, @theia/ai-chat, @theia/ai-claude-code, @theia/ai-code-completion, @theia/ai-core, @theia/ai-editor.
What version fixes CVE-2026-46580?
Upgrading to 1.71.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @theia/ai-chat-ui affected?
Yes, @theia/ai-chat-ui is affected in releases prior to 1.71.0. Upgrade your dependency to 1.71.0 or later.
Is @theia/ai-chat affected?
Yes, @theia/ai-chat is affected in releases prior to 1.71.0. Upgrade your dependency to 1.71.0 or later.
What CWE is associated with CVE-2026-46580?
CVE-2026-46580 is classified under CWE-829: Inclusion of Functionality from Untrusted Control Sphere (The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.).
How can I check npm dependencies for CVE-2026-46580?
Run the dependency tree command: 'npm ls @theia/ai-chat-ui'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-m973-pr9r-hp2w",
  "modified" : "2026-06-19T19:20:46Z",
  "published" : "2026-06-18T18:35:23Z",
  "aliases" : [ "CVE-2026-46580" ],
  "summary" : "[Eclipse Theia] Indirect Prompt Injection via Auto-Loaded Workspace Prompt Template Files in AI Chat",
  "details" : "In Eclipse Theia versions prior to 1.71.0, files matching the pattern .prompts/*.prompttemplate in a workspace were automatically loaded and could override or extend the AI agent's system prompts. An attacker could craft a malicious repository containing prompt template files that, when the workspace was opened in Theia, replaced the AI's system instructions with attacker-controlled content (indirect prompt injection). Combined with other AI chat features available in untrusted workspaces, this enabled attack chains leading to data exfiltration via Markdown image rendering or arbitrary command execution via task definitions.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@theia/ai-chat-ui"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.71.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@theia/ai-chat"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.71.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@theia/ai-claude-code"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.71.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@theia/ai-code-completion"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.71.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@theia/ai-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.71.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@theia/ai-editor"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.71.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-46580"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/eclipse-theia/theia/issues/16892"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/eclipse-theia/theia/pull/17364"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/eclipse-theia/theia/commit/e3fdfe6992389bc5fa611058d00c39d7408508ed"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/eclipse-theia/theia"
  }, {
    "type" : "WEB",
    "url" : "https://gitlab.eclipse.org/security/cve-assignment/-/work_items/114"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-829" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-19T19:20:46Z",
    "nvd_published_at" : "2026-06-18T16:16:54Z"
  }
}