Electron device permission bypass in cross-origin iframes
electron
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| electron npm |
|
|
electron
| Product | Affected | Fixed in |
|---|---|---|
| electron npm |
|
|
Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. Prior to versions 42.11.3, 43.7.0, 44.3.0, and 45.0.0-alpha.5, hid and usb permission checks made from an iframe caused setPermissionCheckHandler to receive the top-level frame's origin and details instead of the requesting frame's. An application that delegated hid or usb to a cross-origin untrusted iframe and allowed device access with origin-based logic could therefore grant that embedded frame access intended for the top-level page. This issue is fixed in versions 42.11.3, 43.7.0, 44.3.0, and 45.0.0-alpha.5.
From the CVE record · GitHub_M
Electron passed the top-level frame’s origin and details to setPermissionCheckHandler for HID and USB permission checks made by an iframe, rather than the requesting frame’s. If an application delegates HID or USB access to an untrusted cross-origin iframe and uses origin-based permission logic, that iframe could gain device access intended for the top-level page.
Teams running the npm electron package in affected ranges: >=45.0.0-alpha.1 <45.0.0-alpha.5, >=44.0.0-alpha.1 <44.3.0, >=43.0.0-alpha.1 <43.7.0, or <42.11.3.