Packages / electron / Security
Renderers can obtain access to random bluetooth device without permission in Electron
Affected releases · electron
- 16.x16.0.0 – 16.0.5Fixed in 16.0.6
- 15.x15.0.0 – 15.3.4Fixed in 15.3.5
- 14.x14.0.0 – 14.2.3Fixed in 14.2.4
- 13.x13.0.0 – 13.6.3Fixed in 13.6.6
- 12.x and older0.1.0 – 12.2.3No fix, no longer updated
On 16.x, the newest line:
npm install electron@16.0.6Not affected
45.0.0
1 release, latest
Affected
16.0.0 – 16.0.5
6 releases
Fixed
16.0.6 – 16.2.8
16 releases
Affected
15.0.0 – 15.3.4
10 releases
Fixed
15.3.5 – 15.5.7
14 releases
Affected
14.0.0 – 14.2.3
9 releases
Fixed
14.2.4 – 14.2.9
6 releases
Affected
13.0.0 – 13.6.3
25 releases
Fixed
13.6.6 – 13.6.9
4 releases
Affected
12.0.0 – 12.2.3
26 releases
Affected
11.0.0 – 11.5.0
27 releases
Affected
10.0.0 – 10.4.7
22 releases
Affected
9.0.0 – 9.4.4
22 releases
Affected
8.0.0 – 8.5.5
25 releases
Affected
7.0.0 – 7.3.3
26 releases
Affected
6.0.0 – 6.1.12
26 releases
Affected
5.0.0 – 5.0.13
14 releases
Affected
4.0.0 – 4.2.12
28 releases
Affected
3.0.0 – 3.1.13
31 releases
Affected
2.0.0 – 2.0.18
19 releases
Affected
1.3.1 – 1.8.8
79 releases
Affected
0.1.0 – 0.4.1
8 releases
Is your project affected?
Paste your package.json, or type the range you declare for electron. It is read in your browser and sent nowhere.
What happens
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.616.0.615.3.514.2.413.6.6
Workarounds
Adding this code to your app can workaround the issue.
app.on('web-contents-created', (event, webContents) => {
webContents.on('select-bluetooth-device', (event, devices, callback) => {
// Prevent default behavior
event.preventDefault();
// Cancel the request
callback('');
});
});For more information If you have any questions or comments about this advisory, email us at security@electronjs.org.