CVE-2022-21718
JSON

3.4low

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

Severity
3.4low CVSS:3.1 by GitHub_M
Exploit likelihood
0.95% (higher than 62% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-3p22-ghq8-v749

Description

Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. A vulnerability in versions prior to `17.0.0-alpha.6`, `16.0.6`, `15.3.5`, `14.2.4`, and `13.6.6` allows renderers to obtain access to a bluetooth device via the web bluetooth API if the app has not configured a custom `select-bluetooth-device` event handler. This has been patched and Electron versions `17.0.0-alpha.6`, `16.0.6`, `15.3.5`, `14.2.4`, and `13.6.6` contain the fix. Code from the GitHub Security Advisory can be added to the app to work around the issue.

Affected

Product or packageVersionsReported by
electron electron< 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.5CVE List
electron (npm)before 13.6.6, from 14.0.0-beta.1 before 14.2.4, from 15.0.0-beta.1 before 15.3.5, from 16.0.0-beta.1 before 16.0.6, from 17.0.0-alpha.1 before 17.0.0-alpha.6GitHub Advisory Database
electronjs electronbefore 13.6.6, from 14.0.0 before 14.2.4, from 15.0.0 before 15.3.5, from 16.0.0 before 16.0.6, 17.0.0NVD

All scores

GitHub_M3.4low CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:N/A:N
GitHub3.4low CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:N/A:N
NVD5.0medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N
NVD4.0medium CVSS:2.0AV:N/AC:L/Au:S/C:P/I:N/A:N

Classification

CWE-668CWE-862

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. A vulnerability in versions prior to `17.0.0-alpha.6`, `16.0.6`, `15.3.5`, `14.2.4`, and `13.6.6` allows renderers to obtain access to a bluetooth device via the web bluetooth API if the app has not configured a custom `select-bluetooth-device` event handler. This has been patched and Electron versions `17.0.0-alpha.6`, `16.0.6`, `15.3.5`, `14.2.4`, and `13.6.6` contain the fix. Code from the GitHub Security Advisory can be added to the app to work around the issue.

GitHub Advisory Database
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 security@electronjs.org.

NVD (es)

Electron es un marco de trabajo para escribir aplicaciones de escritorio multiplataforma usando JavaScript, HTML y CSS. Una vulnerabilidad en las versiones anteriores a "17.0.0-alpha.6", "16.0.6", "15.3.5", "14.2.4" y "13.6.6" permite a renderizadores obtener acceso a un dispositivo bluetooth por medio de la API bluetooth de la web si la aplicación no ha configurado un controlador de eventos personalizado "select-bluetooth-device". Esto ha sido parcheado y las versiones de Electron "17.0.0-alpha.6", "16.0.6", "15.3.5", "14.2.4" y "13.6.6" contienen la corrección. El código del aviso de seguridad de GitHub puede añadirse a la aplicación para mitigar el problema

References

Sources

SourceRecordLicence
CVE ListCVE-2022-21718 changed 2025-04-23CVE Terms of Use
GitHub Advisory DatabaseGHSA-3p22-ghq8-v749 changed 2023-11-08CC-BY-4.0
NVDCVE-2022-21718 changed 2026-06-17Public domain