A code vulnerability has been discovered that allows Node to be re-enabled in child windows.
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 window will have
nodeIntegration enabled. This vulnerability affects all supported versions of Electron.
We've published new versions of Electron which include fixes for this vulnerability:
5.0.0-beta.2. We encourage all Electron developers to update their apps to the latest stable version immediately.
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());
This vulnerability was found and reported responsibly to the Electron project by PalmerAL.
Чтобы узнать больше о лучших методах обеспечения безопасности приложений Electron, смотрите наш учебник по безопасности.
If you wish to report a vulnerability in Electron, email firstname.lastname@example.org.