Skip to content

Renderers can obtain access to random bluetooth device without permission in Electron

Low severity GitHub Reviewed Published Mar 21, 2022 in electron/electron • Updated Jul 24, 2023

Package

npm electron (npm)

Affected versions

< 13.6.6
>= 14.0.0-beta.1, < 14.2.4
>= 15.0.0-beta.1, < 15.3.5
>= 16.0.0-beta.1, < 16.0.6
>= 17.0.0-alpha.1, <= 17.0.0-alpha.5

Patched versions

13.6.6
14.2.4
15.3.5
16.0.6
17.0.0-alpha.6

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

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 [email protected].

References

@MarshallOfSound MarshallOfSound published to electron/electron Mar 21, 2022
Published by the National Vulnerability Database Mar 22, 2022
Published to the GitHub Advisory Database Mar 22, 2022
Reviewed Mar 22, 2022
Last updated Jul 24, 2023

Severity

Low

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
High
User interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:N/A:N

EPSS score

0.141%
(51st percentile)

CVE ID

CVE-2022-21718

GHSA ID

GHSA-3p22-ghq8-v749

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.