{"id":"GHSA-3p22-ghq8-v749","summary":"Renderers can obtain access to random bluetooth device without permission in Electron","details":"### Impact\nThis vulnerability allows renderers to obtain access to a random bluetooth device via the [web bluetooth API](https://developer.mozilla.org/en-US/docs/Web/API/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.\n\nAll current stable versions of Electron are affected.\n\n### Patches\nThis has been patched and the following Electron versions contain the fix:\n* `17.0.0-alpha.6`\n* `16.0.6`\n* `15.3.5`\n* `14.2.4`\n* `13.6.6`\n\n### Workarounds\nAdding this code to your app can workaround the issue.\n\n```js\napp.on('web-contents-created', (event, webContents) =\u003e {\n  webContents.on('select-bluetooth-device', (event, devices, callback) =\u003e {\n    // Prevent default behavior\n    event.preventDefault();\n    // Cancel the request\n    callback('');\n  });\n});\n```\n\nFor more information\nIf you have any questions or comments about this advisory, email us at security@electronjs.org.","aliases":["CVE-2022-21718"],"modified":"2023-11-08T04:08:09.293794Z","published":"2022-03-22T18:49:36Z","database_specific":{"nvd_published_at":"2022-03-22T17:15:00Z","cwe_ids":["CWE-668","CWE-862"],"severity":"LOW","github_reviewed":true,"github_reviewed_at":"2022-03-22T18:49:36Z"},"references":[{"type":"WEB","url":"https://github.com/electron/electron/security/advisories/GHSA-3p22-ghq8-v749"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-21718"},{"type":"WEB","url":"https://github.com/electron/electron/pull/32178"},{"type":"WEB","url":"https://github.com/electron/electron/pull/32240"},{"type":"PACKAGE","url":"https://github.com/electron/electron"}],"affected":[{"package":{"name":"electron","ecosystem":"npm","purl":"pkg:npm/electron"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"13.6.6"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/03/GHSA-3p22-ghq8-v749/GHSA-3p22-ghq8-v749.json"}},{"package":{"name":"electron","ecosystem":"npm","purl":"pkg:npm/electron"},"ranges":[{"type":"SEMVER","events":[{"introduced":"14.0.0-beta.1"},{"fixed":"14.2.4"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/03/GHSA-3p22-ghq8-v749/GHSA-3p22-ghq8-v749.json"}},{"package":{"name":"electron","ecosystem":"npm","purl":"pkg:npm/electron"},"ranges":[{"type":"SEMVER","events":[{"introduced":"15.0.0-beta.1"},{"fixed":"15.3.5"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/03/GHSA-3p22-ghq8-v749/GHSA-3p22-ghq8-v749.json"}},{"package":{"name":"electron","ecosystem":"npm","purl":"pkg:npm/electron"},"ranges":[{"type":"SEMVER","events":[{"introduced":"16.0.0-beta.1"},{"fixed":"16.0.6"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/03/GHSA-3p22-ghq8-v749/GHSA-3p22-ghq8-v749.json"}},{"package":{"name":"electron","ecosystem":"npm","purl":"pkg:npm/electron"},"ranges":[{"type":"SEMVER","events":[{"introduced":"17.0.0-alpha.1"},{"fixed":"17.0.0-alpha.6"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/03/GHSA-3p22-ghq8-v749/GHSA-3p22-ghq8-v749.json","last_known_affected_version_range":"\u003c= 17.0.0-alpha.5"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:N/A:N"}]}