Improper Access Control Affecting electron package, versions <13.6.6 >=14.0.0-beta.25 <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.6
Snyk CVSS
Attack Complexity
High
User Interaction
Required
Scope
Changed
Threat Intelligence
EPSS
0.14% (50th
percentile)
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications- Snyk ID SNYK-JS-ELECTRON-2431353
- published 23 Mar 2022
- disclosed 22 Mar 2022
- credit PalmerAL
Introduced: 22 Mar 2022
CVE-2022-21718 Open this link in a new tabHow to fix?
Upgrade electron
to version 13.6.6, 14.2.4, 15.3.5, 16.0.6, 17.0.0-alpha.6 or higher.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Improper Access Control 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.
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('');
});
});