CVE-2021-34435: @theia/mini browser Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-v9w2-v7j9-rjpr
CVSS 8.8
CWE-668 CWE-942 CWE-346
Published
Advisory Summary

CVE-2021-34435 is a HIGH (CVSS 8.8) remote code execution vulnerability (CWE-668: Exposure of Resource to Wrong Sphere) affecting @theia/mini browser libraries in the npm ecosystem. The issue involves remote code execution in eclipse theia. Remediation is available by upgrading affected packages to version 1.9.0.

CVE-2021-34435 at a Glance

CVE Identifier CVE-2021-34435
GHSA Identifier GHSA-v9w2-v7j9-rjpr
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-668: Exposure of Resource to Wrong Sphere
Affected Product @theia/mini browser
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2021-34435

To remediate this vulnerability, upgrade all affected @theia/mini browser 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/mini-browser fixed: 1.9.0
npm install @theia/mini-browser@1.9.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/mini-browser

How to Check if You Are Affected

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

npm ls @theia/mini-browser

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

Note: The npm ls @theia/mini-browser 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-668: Exposure of Resource to Wrong Sphere, where the product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource. In @theia/mini browser, 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 0.3.9 to 1.8.1, the "mini-browser" extension allows a user to preview HTML files in an iframe inside the IDE. But with the way it is made it is possible for a previewed HTML file to trigger an RCE. This exploit only happens if a user previews a malicious file.

CVE-2021-34435 Affected @theia/mini browser Versions

1 component(s)
Fixed Versions:
1.9.0
Product / Package Ecosystem Affected Versions Fixed Version
@theia/mini-browser
npm
≥ 0.3.9
< 1.9.0
1.9.0

References

Frequently Asked Questions

What is CVE-2021-34435?
CVE-2021-34435 is a security vulnerability in @theia/mini browser involving Remote code execution in Eclipse Theia under CWE-668: Exposure of Resource to Wrong Sphere.
Which @theia/mini browser versions are affected?
Affected versions include releases prior to 1.9.0 across affected packages: @theia/mini-browser.
What version fixes CVE-2021-34435?
Upgrading to 1.9.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @theia/mini-browser affected?
Yes, @theia/mini-browser is affected in releases prior to 1.9.0. Upgrade your dependency to 1.9.0 or later.
What is the CVSS score of CVE-2021-34435?
CVE-2021-34435 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2021-34435?
CVE-2021-34435 is classified under CWE-668: Exposure of Resource to Wrong Sphere (The product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource.).
How can I check npm dependencies for CVE-2021-34435?
Run the dependency tree command: 'npm ls @theia/mini-browser'. 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-v9w2-v7j9-rjpr",
  "modified" : "2021-09-13T20:27:30Z",
  "published" : "2021-09-02T22:02:36Z",
  "aliases" : [ "CVE-2021-34435" ],
  "summary" : "Remote code execution in Eclipse Theia",
  "details" : "In Eclipse Theia 0.3.9 to 1.8.1, the \"mini-browser\" extension allows a user to preview HTML files in an iframe inside the IDE. But with the way it is made it is possible for a previewed HTML file to trigger an RCE. This exploit only happens if a user previews a malicious file.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@theia/mini-browser"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.3.9"
      }, {
        "fixed" : "1.9.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-34435"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/eclipse-theia/theia/pull/8759"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/eclipse-theia/theia/commit/0761dcf5fe3c14c27432683d42d2c526ad0cfbd5"
  }, {
    "type" : "WEB",
    "url" : "https://bugs.eclipse.org/bugs/show_bug.cgi?id=568018"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/eclipse-theia/theia"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-346", "CWE-668", "CWE-942" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-09-02T17:12:13Z",
    "nvd_published_at" : "2021-09-01T18:15:00Z"
  }
}