CVE-2022-29247: Electron Compromised Child Renderer Processes Could Vulnerability

LOW
Advisory Identifier: GHSA-mq8j-3h7h-p8g7
CVSS 2.2
CWE-668
Published
Advisory Summary

CVE-2022-29247 is a LOW (CVSS 2.2) compromised child renderer processes could vulnerability (CWE-668: Exposure of Resource to Wrong Sphere) affecting Electron libraries in the npm ecosystem. The issue involves compromised child renderer processes could obtain ipc access without nodeintegrationinsubframes being enabled. Remediation is available by upgrading affected packages to version 15.5.5, 16.2.6, 17.2.0, 18.0.0-beta.6.

CVE-2022-29247 at a Glance

CVE Identifier CVE-2022-29247
GHSA Identifier GHSA-mq8j-3h7h-p8g7
Severity LOW
CVSS v3.1 Base Score 2.2
CWE Classification CWE-668: Exposure of Resource to Wrong Sphere
Affected Product Electron
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 2.2

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

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

How to Fix CVE-2022-29247

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: 15.5.5
npm install electron@15.5.5
electron fixed: 16.2.6
npm install electron@16.2.6
electron fixed: 17.2.0
npm install electron@17.2.0
electron fixed: 18.0.0-beta.6
npm install electron@18.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-2022-29247, 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 15.5.5), 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 This vulnerability allows a renderer with JS execution to obtain access to a new renderer process with `nodeIntegrationInSubFrames` enabled which in turn allows effective access to `ipcRenderer`. Please note the misleadingly named `nodeIntegrationInSubFrames` option does not implicitly grant Node.js access rather it depends on the existing `sandbox` setting. If your application is sandboxed then `nodeIntegrationInSubFrames` just gives access to the sandboxed renderer APIs (which includes `ipcRenderer`). If your application then additionally exposes IPC messages without IPC `senderFrame` validation that perform privileged actions or return confidential data this access to `ipcRenderer` can in turn compromise your application / user even with the sandbox enabled. ### Patches This has been patched and the following Electron versions contain the fix: * `18.0.0-beta.6` * `17.2.0` * `16.2.6` * `15.5.5` ### Workarounds Ensure that all IPC message handlers appropriately validate `senderFrame` as per our [security tutorial here](https://github.com/electron/electron/blob/main/docs/tutorial/security.md#17-validate-the-sender-of-all-ipc-messages). ### For more information If you have any questions or comments about this advisory, email us at [security@electronjs.org](mailto:security@electronjs.org).

CVE-2022-29247 Affected Electron Versions

4 component(s)
Fixed Versions:
15.5.516.2.617.2.018.0.0-beta.6
Product / Package Ecosystem Affected Versions Fixed Version
electron
npm
< 15.5.5
15.5.5
electron
npm
≥ 16.0.0
< 16.2.6
16.2.6
electron
npm
≥ 17.0.0
< 17.2.0
17.2.0
electron
npm
≥ 18.0.0-beta.1
< 18.0.0-beta.6
18.0.0-beta.6

References

Frequently Asked Questions

What is CVE-2022-29247?
CVE-2022-29247 is a security vulnerability in Electron involving Compromised child renderer processes could obtain IPC access without nodeIntegrationInSubFrames being enabled under CWE-668: Exposure of Resource to Wrong Sphere.
Which Electron versions are affected?
Affected versions include releases prior to 15.5.5, 16.2.6, 17.2.0, 18.0.0-beta.6 across affected packages: electron.
What version fixes CVE-2022-29247?
Upgrading to 15.5.5, 16.2.6, 17.2.0, 18.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 15.5.5, 16.2.6, 17.2.0, 18.0.0-beta.6. Upgrade your dependency to 15.5.5, 16.2.6, 17.2.0, 18.0.0-beta.6 or later.
What is the CVSS score of CVE-2022-29247?
CVE-2022-29247 has a CVSS v3.1 base score of 2.2 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2022-29247?
CVE-2022-29247 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-2022-29247?
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-mq8j-3h7h-p8g7",
  "modified" : "2022-06-16T23:14:33Z",
  "published" : "2022-06-16T23:14:33Z",
  "aliases" : [ "CVE-2022-29247" ],
  "summary" : "Compromised child renderer processes could obtain IPC access without nodeIntegrationInSubFrames being enabled",
  "details" : "### Impact\nThis vulnerability allows a renderer with JS execution to obtain access to a new renderer process with `nodeIntegrationInSubFrames` enabled which in turn allows effective access to `ipcRenderer`.\n\nPlease note the misleadingly named `nodeIntegrationInSubFrames` option does not implicitly grant Node.js access rather it depends on the existing `sandbox` setting.  If your application is sandboxed then `nodeIntegrationInSubFrames` just gives access to the sandboxed renderer APIs (which includes `ipcRenderer`).\n\nIf your application then additionally exposes IPC messages without IPC `senderFrame` validation that perform privileged actions or return confidential data this access to `ipcRenderer` can in turn compromise your application / user even with the sandbox enabled.\n\n### Patches\nThis has been patched and the following Electron versions contain the fix:\n\n* `18.0.0-beta.6`\n* `17.2.0`\n* `16.2.6`\n* `15.5.5`\n\n### Workarounds\nEnsure that all IPC message handlers appropriately validate `senderFrame` as per our [security tutorial here](https://github.com/electron/electron/blob/main/docs/tutorial/security.md#17-validate-the-sender-of-all-ipc-messages).\n\n### For more information\n\nIf you have any questions or comments about this advisory, email us at [security@electronjs.org](mailto:security@electronjs.org).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "electron"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "15.5.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "electron"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "16.0.0"
      }, {
        "fixed" : "16.2.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "electron"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "17.0.0"
      }, {
        "fixed" : "17.2.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "electron"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "18.0.0-beta.1"
      }, {
        "fixed" : "18.0.0-beta.6"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 18.0.0-beta.5"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/electron/electron/security/advisories/GHSA-mq8j-3h7h-p8g7"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-29247"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/electron/electron"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-668" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-06-16T23:14:33Z",
    "nvd_published_at" : "2022-06-13T21:15:00Z"
  }
}