This vulnerability (CVE-2026-113800 / GHSA-fw47-9c62-h3vw) is an origin validation error (CWE-346) in Electron's HID and USB permission handling. When a cross-origin iframe with allow="hid" or allow="usb" requested device access, the permission check was attributed to the top-level frame's origin rather than the requesting iframe's origin.
The root cause has two parts, both fixed in the patch:
-
In Electron's own delegates (ElectronHidDelegate and ElectronUsbDelegate), the CanRequestDevicePermission methods called ElectronPermissionManager::CheckPermissionWithDetails with a null RenderFrameHost and the top-level origin that Chromium content handed them. Because the frame was null, CheckPermissionWithDetails set webContents to null, did not populate requestingUrl, and set isMainFrame to false — so session.setPermissionCheckHandler received the top-level origin with no way to identify the actual requesting frame. The fix passes the actual render_frame_host and computes the requesting frame's origin via a new RequestingOrigin() helper.
-
In upstream Chromium code (carried as Electron patches), HidService and WebUsbServiceImpl were constructed keyed on the main frame's origin (GetMainFrame()->GetLastCommittedOrigin()) rather than the requesting frame's origin. This meant the origin_ member used throughout the delegate calls was the top-level origin. The fix keys both services on the requesting frame's origin.
Additionally, the HasDevicePermission methods in both delegates used the top-level origin directly instead of the requesting frame's origin, causing grant/check/revoke to disagree on the scoped origin.
An attacker-controlled cross-origin iframe could therefore be granted HID/USB access that the app intended only for the top-level page, if the app used origin-based logic in setPermissionCheckHandler. The functions listed above are the ones that would appear in a runtime profile/stack trace when such a permission check is triggered during exploitation.