Summary
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].
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.
The application does not perform an authorization check before performing a sensitive operation. Typical impact: unauthorized access to restricted functionality or data.
CVE-2022-21718 has a CVSS score of 3.4 (Low). The vector is network-reachable, high privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (13.6.6, 14.2.4, 15.3.5, 16.0.6, 17.0.0-alpha.6); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
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
Frequently Asked Questions
- What is CVE-2022-21718? CVE-2022-21718 is a low-severity missing authorization vulnerability in electron (npm), affecting versions < 13.6.6. It is fixed in 13.6.6, 14.2.4, 15.3.5, 16.0.6, 17.0.0-alpha.6. The application does not perform an authorization check before performing a sensitive operation.
- How severe is CVE-2022-21718? CVE-2022-21718 has a CVSS score of 3.4 (Low). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of electron are affected by CVE-2022-21718? electron (npm) versions < 13.6.6 is affected.
- Is there a fix for CVE-2022-21718? Yes. CVE-2022-21718 is fixed in 13.6.6, 14.2.4, 15.3.5, 16.0.6, 17.0.0-alpha.6. Upgrade to this version or later.
- Is CVE-2022-21718 exploitable, and should I be worried? Whether CVE-2022-21718 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2022-21718 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2022-21718?
- Upgrade
electronto 13.6.6 or later - Upgrade
electronto 14.2.4 or later - Upgrade
electronto 15.3.5 or later - Upgrade
electronto 16.0.6 or later - Upgrade
electronto 17.0.0-alpha.6 or later
- Upgrade