ghsa-p7v2-p9m8-qqg7
Vulnerability from github
Impact
Apps using contextIsolation
and contextBridge
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
This issue is exploitable under either of two conditions:
* If an API exposed to the main world via contextBridge
can return an object or array that contains a JS object which cannot be serialized, for instance, a canvas rendering context. This would normally result in an exception being thrown Error: object could not be cloned
.
* If an API exposed to the main world via contextBridge
has a return value that throws a user-generated exception while being sent over the bridge, for instance a dynamic getter property on an object that throws an error when being computed.
The app side workaround is to ensure that such a case is not possible. Ensure all values returned from a function exposed over the context bridge are supported and that any objects returned from functions do not have dynamic getters that can throw exceptions.
Auditing your exposed API is likely to be quite difficult so we strongly recommend you update to a patched version of Electron.
Fixed Versions
25.0.0-alpha.2
24.0.1
23.2.3
22.3.6
For more information
If you have any questions or comments about this advisory, email us at security@electronjs.org
{ "affected": [ { "package": { "ecosystem": "npm", "name": "electron" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "22.3.6" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "npm", "name": "electron" }, "ranges": [ { "events": [ { "introduced": "23.0.0-alpha.1" }, { "fixed": "23.2.3" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "npm", "name": "electron" }, "ranges": [ { "events": [ { "introduced": "24.0.0-alpha.1" }, { "fixed": "24.0.1" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "npm", "name": "electron" }, "ranges": [ { "events": [ { "introduced": "25.0.0-alpha.1" }, { "fixed": "25.0.0-alpha.2" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2023-29198" ], "database_specific": { "cwe_ids": [ "CWE-754" ], "github_reviewed": true, "github_reviewed_at": "2023-09-06T19:50:58Z", "nvd_published_at": "2023-09-06T21:15:11Z", "severity": "MODERATE" }, "details": "### Impact\nApps using `contextIsolation` and `contextBridge` 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\nThis issue is exploitable under either of two conditions:\n* If an API exposed to the main world via `contextBridge` can return an object or array that contains a JS object which cannot be serialized, for instance, a canvas rendering context. This would normally result in an exception being thrown `Error: object could not be cloned`.\n* If an API exposed to the main world via `contextBridge` has a return value that throws a user-generated exception while being sent over the bridge, for instance a dynamic getter property on an object that throws an error when being computed.\n\nThe app side workaround is to ensure that such a case is not possible. Ensure all values returned from a function exposed over the context bridge are [supported](https://www.electronjs.org/docs/latest/api/context-bridge#parameter--error--return-type-support) and that any objects returned from functions do not have dynamic getters that can throw exceptions.\n\nAuditing your exposed API is likely to be quite difficult so we strongly recommend you update to a patched version of Electron.\n\n### Fixed Versions\n* `25.0.0-alpha.2`\n* `24.0.1`\n* `23.2.3`\n* `22.3.6`\n\n### For more information\nIf you have any questions or comments about this advisory, email us at [security@electronjs.org](mailto:security@electronjs.org)", "id": "GHSA-p7v2-p9m8-qqg7", "modified": "2023-09-06T19:50:58Z", "published": "2023-09-06T19:50:58Z", "references": [ { "type": "WEB", "url": "https://github.com/electron/electron/security/advisories/GHSA-p7v2-p9m8-qqg7" }, { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-29198" }, { "type": "PACKAGE", "url": "https://github.com/electron/electron" }, { "type": "WEB", "url": "https://www.electronjs.org/docs/latest/api/context-bridge#parameter--error--return-type-support" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:L", "type": "CVSS_V3" } ], "summary": "Electron context isolation bypass via nested unserializable return value" }
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.