CVE-2020-15215: Electron Context Isolation Bypass Vulnerability

LOW
Advisory Identifier: GHSA-56pc-6jqp-xqj8
CVSS 5.6
CWE-668 CWE-693
Published
Advisory Summary

CVE-2020-15215 is a LOW (CVSS 5.6) context isolation bypass vulnerability (CWE-668: Exposure of Resource to Wrong Sphere) affecting Electron libraries in the npm ecosystem. The issue involves context isolation bypass in electron. Remediation is available by upgrading affected packages to version 8.5.2, 9.3.1, 10.1.2, 11.0.0-beta.6.

CVE-2020-15215 at a Glance

CVE Identifier CVE-2020-15215
GHSA Identifier GHSA-56pc-6jqp-xqj8
Severity LOW
CVSS v3.1 Base Score 5.6
CWE Classification CWE-668: Exposure of Resource to Wrong Sphere
Affected Product Electron
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 5.6

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

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

How to Fix CVE-2020-15215

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

electron fixed: 8.5.2
npm install electron@8.5.2
electron fixed: 9.3.1
npm install electron@9.3.1
electron fixed: 10.1.2
npm install electron@10.1.2
electron fixed: 11.0.0-beta.6
npm install electron@11.0.0-beta.6
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 electron

How to Check if You Are Affected

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

npm ls electron

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

Note: The npm ls electron 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 Electron, 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

### Impact Apps using both `contextIsolation` and `sandbox: true` are affected. Apps using both `contextIsolation` and `nativeWindowOpen: true` are affected. This is a context isolation bypass, meaning that code running in the main world context in the renderer can reach into the isolated Electron context and perform privileged actions. ### Workarounds There are no app-side workarounds, you must update your Electron version to be protected. ### Fixed Versions * `11.0.0-beta.6` * `10.1.2` * `9.3.1` * `8.5.2` ### For more information If you have any questions or comments about this advisory: * Email us at [security@electronjs.org](mailto:security@electronjs.org)

CVE-2020-15215 Affected Electron Versions

4 component(s)
Fixed Versions:
8.5.29.3.110.1.211.0.0-beta.6
Product / Package Ecosystem Affected Versions Fixed Version
electron
npm
≥ 8.0.0-beta.0
< 8.5.2
8.5.2
electron
npm
≥ 9.0.0-beta.0
< 9.3.1
9.3.1
electron
npm
≥ 10.0.0-beta.0
< 10.1.2
10.1.2
electron
npm
≥ 11.0.0-beta.0
< 11.0.0-beta.6
11.0.0-beta.6

References

Frequently Asked Questions

What is CVE-2020-15215?
CVE-2020-15215 is a security vulnerability in Electron involving Context isolation bypass in Electron under CWE-668: Exposure of Resource to Wrong Sphere.
Which Electron versions are affected?
Affected versions include releases prior to 8.5.2, 9.3.1, 10.1.2, 11.0.0-beta.6 across affected packages: electron.
What version fixes CVE-2020-15215?
Upgrading to 8.5.2, 9.3.1, 10.1.2, 11.0.0-beta.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is electron affected?
Yes, electron is affected in releases prior to 8.5.2, 9.3.1, 10.1.2, 11.0.0-beta.6. Upgrade your dependency to 8.5.2, 9.3.1, 10.1.2, 11.0.0-beta.6 or later.
What is the CVSS score of CVE-2020-15215?
CVE-2020-15215 has a CVSS v3.1 base score of 5.6 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2020-15215?
CVE-2020-15215 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-2020-15215?
Run the dependency tree command: 'npm ls electron'. 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-56pc-6jqp-xqj8",
  "modified" : "2021-01-07T22:51:36Z",
  "published" : "2020-10-06T17:46:40Z",
  "aliases" : [ "CVE-2020-15215" ],
  "summary" : "Context isolation bypass in Electron",
  "details" : "### Impact\nApps using both `contextIsolation` and `sandbox: true` are affected.\nApps using both `contextIsolation` and `nativeWindowOpen: true` are affected.\n\nThis is a context isolation bypass, meaning that code running in the main world context in the renderer can reach into the isolated Electron context and perform privileged actions.\n\n### Workarounds\nThere are no app-side workarounds, you must update your Electron version to be protected.\n\n### Fixed Versions\n* `11.0.0-beta.6`\n* `10.1.2`\n* `9.3.1`\n* `8.5.2`\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Email us at [security@electronjs.org](mailto:security@electronjs.org)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "electron"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.0.0-beta.0"
      }, {
        "fixed" : "8.5.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "electron"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "9.0.0-beta.0"
      }, {
        "fixed" : "9.3.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "electron"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.0.0-beta.0"
      }, {
        "fixed" : "10.1.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "electron"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "11.0.0-beta.0"
      }, {
        "fixed" : "11.0.0-beta.6"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 11.0.0-beta.5"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/electron/electron/security/advisories/GHSA-56pc-6jqp-xqj8"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-15215"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-668", "CWE-693" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-10-06T17:46:06Z",
    "nvd_published_at" : null
  }
}