Renderers can obtain access to random bluetooth device without permission
Electron renderer processes could access a random nearby Bluetooth device via the Web Bluetooth API without the app's custom device selection handler, bypassing the expected permission prompt. An attacker loading remote content in a renderer could gain read/write access to whatever Bluetooth device happened to be selected.
- Fixed in 47 hours
- Paid in 47 hours
- Disclosed after 32 days
Summary by the program
Renderers can obtain access to random bluetooth device without permission Description Impact This vulnerability allows renderers to obtain access to a random bluetooth device via the web bluetooth API if the app has not configured a custom select-bluetooth-device event handler. The device that is accessed is random and the attacker would have no way of selecting a specific device.
All current stable versions of Electron are affected.
Patches This has been patched and the following Electron versions contain the fix:
17.0.0-alpha.6 16.0.6 15.3.5 14.2.4 13.6.6
Workarounds can be found in the security advisory linked below.
For more information If you have any questions or comments about this advisory, email us at [email protected].
https://github.com/electron/electron/security/advisories/GHSA-3p22-ghq8-v749
The report
With the default configuration in Electron, renderer processes (which should not have access to system resources by default) can gain read/write access to a nearby bluetooth device. To reproduce:
- Run the electron-quick-start app with a vulnerable version of Electron: https://github.com/electron/electron-quick-start
- Using the developer tools, run
await navigator.bluetooth.requestDevice({acceptAllDevices: true}) - You should get a permission error, but in vulnerable versions you will get a bluetooth device object instead.
Impact
If an Electron app loads remote or untrusted content in a renderer process (which is normally fine, as the process should not have any privileges), the remote content would have read/write access to nearby bluetooth devices. The impact would then depend on what devices the user has nearby.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the default Web Bluetooth device chooser in Electron did not enforce a permission check when no custom select-bluetooth-device handler was configured, so the renderer received a device object instead of an error.
Impact
Remote or untrusted content loaded in a renderer could read and write to a random nearby Bluetooth device, with the real impact depending on what devices the user has nearby.
What the attacker needed
Electron app with default config; App loads remote or untrusted content; No custom select-bluetooth-device handler; Nearby Bluetooth device
The fix
It was fixed in several Electron versions, including 17.0.0-alpha.6, 16.0.6, 15.3.5, 14.2.4 and 13.6.6.
How it was found
- Run the electron-quick-start app with a vulnerable version of Electron.
- Open the developer tools and call the Web Bluetooth requestDevice API with acceptAllDevices set to true.
- Observe that instead of a permission error, a Bluetooth device object is returned.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Electron is a framework for building desktop apps with web technology. Normally, web content inside an app is sandboxed and cannot touch hardware like Bluetooth without asking the user. Here, a bug let that web content talk to a random nearby Bluetooth device without the user choosing or approving it.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.