CVE-2022-29247: Electron Compromised Child Renderer Processes Could Vulnerability
LOWCVE-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
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).
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.
npm install electron@15.5.5
npm install electron@16.2.6
npm install electron@17.2.0
npm install electron@18.0.0-beta.6
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
CVE-2022-29247 Affected Electron Versions
4 component(s)| 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?
Which Electron versions are affected?
What version fixes CVE-2022-29247?
Is electron affected?
What is the CVSS score of CVE-2022-29247?
What CWE is associated with CVE-2022-29247?
How can I check npm dependencies for CVE-2022-29247?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}