Skip to content

CVE-2023-29198 Context isolation bypass via nested unserializable return value in Electron

HighCVSS 8.5 EPSS 0.59%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: no · technical impact: partial

Description

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.

Upgrade path

3 packages: 2 fixed.

PackageAffectedFixed inStatus
electronjs electron < 22.3.6; = 24.0.0; = 24.0.0-alpha1; = 24.0.0-alpha2 +14 more 22.3.6, 23.2.3 Fixed
npm electron(npm) < 22.3.6; >= 23.0.0-alpha.1, < 23.2.3; >= 24.0.0-alpha.1, < 24.0.1; >= 25.0.0-alpha.1, < 25.0.0-alpha.2 22.3.6, 23.2.3, 24.0.1, 25.0.0-alpha.2 Fixed
electron = < 22.3.6; = >= 23.0.0, < 23.2.3; = >= 24.0.0, < 24.0.1; = >= 25.0.0-alpha.1, < 25.0.0-alpha.2 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
npm electron(npm) < 22.3.6 22.3.6
npm electron(npm) >= 23.0.0-alpha.1, < 23.2.3 23.2.3
npm electron(npm) >= 24.0.0-alpha.1, < 24.0.1 24.0.1
npm electron(npm) >= 25.0.0-alpha.1, < 25.0.0-alpha.2 25.0.0-alpha.2
electron = < 22.3.6 No fix listed
electron = >= 23.0.0, < 23.2.3 No fix listed
electron = >= 24.0.0, < 24.0.1 No fix listed
electron = >= 25.0.0-alpha.1, < 25.0.0-alpha.2 No fix listed
electronjs electron < 22.3.6 22.3.6
electronjs electron >= 23.0.0, < 23.2.3 23.2.3
electronjs electron = 24.0.0 No fix listed
electronjs electron = 24.0.0-alpha1 No fix listed
electronjs electron = 24.0.0-alpha2 No fix listed
electronjs electron = 24.0.0-alpha3 No fix listed
electronjs electron = 24.0.0-alpha4 No fix listed
electronjs electron = 24.0.0-alpha5 No fix listed
electronjs electron = 24.0.0-alpha6 No fix listed
electronjs electron = 24.0.0-alpha7 No fix listed
electronjs electron = 24.0.0-beta1 No fix listed
electronjs electron = 24.0.0-beta2 No fix listed
electronjs electron = 24.0.0-beta3 No fix listed
electronjs electron = 24.0.0-beta4 No fix listed
electronjs electron = 24.0.0-beta5 No fix listed
electronjs electron = 24.0.0-beta6 No fix listed
electronjs electron = 24.0.0-beta7 No fix listed
Show 1 more
ProductAffected versionsFixed in
electronjs electron = 25.0.0-alpha1 No fix listed

References