Arbitrary Code Execution

Affecting electron package, versions <2.0.17 || >=3.0.0 <3.0.15 || >=3.1.0 <3.1.3 || >=4.0.0 <4.0.4 || >=5.0.0-beta.1 <5.0.0-beta.2

Report new vulnerabilities
Do your applications use this vulnerable package? Test your applications

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 Arbitrary Code Execution. Opening a BrowserView with sandbox: true or nativeWindowOpen: true and nodeIntegration: false results in a webContents where window.open() can be called and the newly opened child will have nodeIntegration enabled.

Remediation

Upgrade electron to version 2.0.17, 3.0.15, 3.1.3, 4.0.4, 5.0.0-beta.2 or higher.

If for some reason you are unable to upgrade your Electron version, you can mitigate this issue by disabling all child web contents: view.webContents.on('-add-new-contents', e => e.preventDefault());

References

CVSS Score

8.2
high severity
  • Attack Vector
    Network
  • Attack Complexity
    Low
  • Privileges Required
    None
  • User Interaction
    Required
  • Scope
    Changed
  • Confidentiality
    High
  • Integrity
    Low
  • Availability
    None
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N
Credit
PalmerAL
CWE
CWE-1188
Snyk ID
SNYK-JS-ELECTRON-483050
Disclosed
31 Jan, 2019
Published
11 Nov, 2019