Improper Access Control Affecting org.webjars.npm:electron package, versions [0,]


0.0
low

Snyk CVSS

    Attack Complexity High
    User Interaction Required
    Scope Changed

    Threat Intelligence

    EPSS 0.14% (50th percentile)
Expand this section
NVD
5 medium

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-JAVA-ORGWEBJARSNPM-2431354
  • published 23 Mar 2022
  • disclosed 22 Mar 2022
  • credit PalmerAL

How to fix?

There is no fixed version for org.webjars.npm:electron.

Overview

org.webjars.npm: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('');
  });
});