#  Renderers can obtain access to random bluetooth device without permission

Electron renderers could call Web Bluetooth requestDevice without permission and get read/write access to a random nearby Bluetooth device.

- Payout: $480
- Severity: low
- Program: Internet Bug Bounty
- Found by: palmeral
- Disclosed: 2022-04-23
- CVE: CVE-2022-21718
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/1519099
- Library page: https://bugbountylibrary.com/r/h1%3A1519099
- Tags: area:os domain:desktop impact:internal-access kind:bounty platform:hackerone sev:low tech:electron vuln:access-control vuln:misconfiguration

**Target:** Electron renderer process / Web Bluetooth API
**Root cause:** Electron did not enforce the permission gate for navigator.bluetooth.requestDevice when no custom select-bluetooth-device handler was configured, so renderers obtained a device object instead of a permission error.
**Steps:**
1. Run electron-quick-start with a vulnerable Electron version.
2. Open DevTools in the renderer.
3. Execute `await navigator.bluetooth.requestDevice({acceptAllDevices: true})`.
4. Observe a BluetoothDevice object is returned instead of a permission error.
**How found:** Researcher tested the Web Bluetooth API from a renderer expecting a permission error and observed a device object was returned instead.
**Exploitation:** Untrusted remote content loaded in a renderer calls navigator.bluetooth.requestDevice({acceptAllDevices:true}) and receives a random nearby Bluetooth device object with read/write access; attacker cannot choose a specific device.
**Insight:** When auditing Electron apps, probe browser APIs that should be gated by permission (Bluetooth, USB, Serial, HID) from renderer context; missing custom event handlers like select-bluetooth-device can leave the default permission path open.

## Proof of concept (copied exactly from the original report)

**DevTools call to request bluetooth device**

```
await navigator.bluetooth.requestDevice({acceptAllDevices: true})
```

