{"id":"CVE-2023-29198","aliases":["CVE-2023-29198","GHSA-p7v2-p9m8-qqg7"],"related":[],"kind":"vulnerability","state":"published","title":"Context isolation bypass via nested unserializable return value in Electron","summary":"Electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS. Electron 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. This issue is only exploitable if an API exposed to the main world via `contextBridge` can return an object or array that contains a javascript 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`. 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. This issue has been fixed in versions `25.0.0-alpha.2`, `24.0.1`, `23.2.3`, and `22.3.6`.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS. Electron 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. This issue is only exploitable if an API exposed to the main world via `contextBridge` can return an object or array that contains a javascript 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`. 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. This issue has been fixed in versions `25.0.0-alpha.2`, `24.0.1`, `23.2.3`, and `22.3.6`.","source":"cvelist"},{"lang":"en","text":"### 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)","format":"markdown","source":"ghsa"},{"lang":"es","text":"Electron es un framework que le permite escribir aplicaciones de escritorio multiplataforma utilizando JavaScript, HTML y CSS. Las aplicaciones de Electron que usan `contextIsolation` y `contextBridge` se ven afectadas. Se trata de una omisión de aislamiento de contexto, lo que significa que el código que se ejecuta en el contexto mundial principal en el renderizador puede acceder al contexto aislado de Electron y realizar acciones privilegiadas. Este problema solo se puede explotar si una API expuesta al mundo principal a través de `contextBridge` puede devolver un objeto o matriz que contenga un objeto javascript que no se pueda serializar, por ejemplo, un contexto de representación de lienzo. Esto normalmente daría como resultado que se lanzara una excepción \"Error: el objeto no se pudo clonar\". El workaround del lado de la aplicación es garantizar que tal caso no sea posible. Asegúrese de que todos los valores devueltos por una función expuesta a través del puente de contexto sean compatibles. Este problema se solucionó en las versiones `25.0.0-alpha.2`, `24.0.1`, `23.2.3` y `22.3.6`.","source":"nvd"}],"published":"2023-09-06T19:50:58.000Z","modified":"2026-09-10T03:49:58.321Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:L","score":6,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:L","score":6,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:L","score":6,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H","score":8.5,"rating":"HIGH"}],"cwes":["CWE-754"],"affected":[{"ranges":[{"version":"< 22.3.6","status":"affected"},{"version":">= 23.0.0, < 23.2.3","status":"affected"},{"version":">= 24.0.0, < 24.0.1","status":"affected"},{"version":">= 25.0.0-alpha.1, < 25.0.0-alpha.2","status":"affected"}],"vendor":"electron","product":"electron","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"22.3.6"}],"ecosystem":"npm","package":"electron","purl":"pkg:npm/electron","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"23.0.0-alpha.1","status":"affected","fixed":"23.2.3"}],"ecosystem":"npm","package":"electron","purl":"pkg:npm/electron","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"24.0.0-alpha.1","status":"affected","fixed":"24.0.1"}],"ecosystem":"npm","package":"electron","purl":"pkg:npm/electron","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"25.0.0-alpha.1","status":"affected","fixed":"25.0.0-alpha.2"}],"ecosystem":"npm","package":"electron","purl":"pkg:npm/electron","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"22.3.6"},{"status":"affected","introduced":"23.0.0","fixed":"23.2.3"},{"status":"affected","version":"24.0.0"},{"status":"affected","version":"24.0.0"},{"status":"affected","version":"24.0.0"},{"status":"affected","version":"24.0.0"},{"status":"affected","version":"24.0.0"},{"status":"affected","version":"24.0.0"},{"status":"affected","version":"24.0.0"},{"status":"affected","version":"24.0.0"},{"status":"affected","version":"24.0.0"},{"status":"affected","version":"24.0.0"},{"status":"affected","version":"24.0.0"},{"status":"affected","version":"24.0.0"},{"status":"affected","version":"24.0.0"},{"status":"affected","version":"24.0.0"},{"status":"affected","version":"24.0.0"},{"status":"affected","version":"25.0.0"}],"vendor":"electronjs","product":"electron","cpe":"cpe:2.3:a:electronjs:electron:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/electron/electron/security/advisories/GHSA-p7v2-p9m8-qqg7","tags":["mitigation","vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.electronjs.org/docs/latest/api/context-bridge#parameter--error--return-type-support","tags":["product","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-29198","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/electron/electron","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-09-26T14:44:07.613Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-29198","url":"https://www.cve.org/CVERecord?id=CVE-2023-29198","licence":"CVE Terms of Use","modified":"2024-09-26T15:12:58.704Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-p7v2-p9m8-qqg7","url":"https://github.com/advisories/GHSA-p7v2-p9m8-qqg7","licence":"CC-BY-4.0","modified":"2026-09-10T03:49:58.321Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-29198","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-29198","licence":"Public domain","modified":"2026-06-17T05:49:35.453Z"}],"updatedAt":"2026-11-25T22:58:27.738Z","epss":{"score":0.0059,"percentile":0.49563,"date":"2026-12-01T12:00:22.000Z"}}