All the vulnerabilities related to the version 9.0.0 of the package
Renderers can obtain access to random bluetooth device without permission in Electron
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.
This has been patched and the following Electron versions contain the fix:
17.0.0-alpha.6
16.0.6
15.3.5
14.2.4
13.6.6
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 security@electronjs.org.
AutoUpdater module fails to validate certain nested components of the bundle
This vulnerability allows attackers who have control over a given apps update server / update storage to serve maliciously crafted update packages that pass the code signing validation check but contain malicious code in some components.
Please note that this kind of attack would require significant privileges in your own auto updating infrastructure and the ease of that attack entirely depends on your infrastructure security.
This has been patched and the following Electron versions contain the fix:
18.0.0-beta.6
17.2.0
16.2.0
15.5.0
There are no workarounds for this issue, please update to a patched version of Electron.
If you have any questions or comments about this advisory, email us at security@electronjs.org
Compromised child renderer processes could obtain IPC access without nodeIntegrationInSubFrames being enabled
This vulnerability allows a renderer with JS execution to obtain access to a new renderer process with nodeIntegrationInSubFrames
enabled which in turn allows effective access to ipcRenderer
.
Please note the misleadingly named nodeIntegrationInSubFrames
option does not implicitly grant Node.js access rather it depends on the existing sandbox
setting. If your application is sandboxed then nodeIntegrationInSubFrames
just gives access to the sandboxed renderer APIs (which includes ipcRenderer
).
If your application then additionally exposes IPC messages without IPC senderFrame
validation that perform privileged actions or return confidential data this access to ipcRenderer
can in turn compromise your application / user even with the sandbox enabled.
This has been patched and the following Electron versions contain the fix:
18.0.0-beta.6
17.2.0
16.2.6
15.5.5
Ensure that all IPC message handlers appropriately validate senderFrame
as per our security tutorial here.
If you have any questions or comments about this advisory, email us at security@electronjs.org.
Exfiltration of hashed SMB credentials on Windows via file:// redirect
When following a redirect, Electron delays a check for redirecting to file:// URLs from other schemes. The contents of the file is not available to the renderer following the redirect, but if the redirect target is a SMB URL such as file://some.website.com/
, then in some cases, Windows will connect to that server and attempt NTLM authentication, which can include sending hashed credentials.
This issue has been fixed in all current stable versions of Electron. Specifically, these versions contain the fixes:
We recommend all apps upgrade to the latest stable version of Electron.
If upgrading isn't possible, this issue can be addressed without upgrading by preventing redirects to file:// URLs in the WebContents.on('will-redirect')
event, for all WebContents:
app.on('web-contents-created', (e, webContents) => {
webContents.on('will-redirect', (e, url) => {
if (/^file:/.test(url)) e.preventDefault()
})
})
If you have any questions or comments about this advisory, email us at security@electronjs.org.
Thanks to user @coolcoolnoworries for reporting this issue.
Electron context isolation bypass via nested unserializable return value
Apps using contextIsolation
and contextBridge
are affected.
This is a context isolation bypass, meaning that code running in the main world context in the renderer can reach into the isolated Electron context and perform privileged actions.
This issue is exploitable under either of two conditions:
contextBridge
can return an object or array that contains a JS object which cannot be serialized, for instance, a canvas rendering context. This would normally result in an exception being thrown Error: object could not be cloned
.contextBridge
has a return value that throws a user-generated exception while being sent over the bridge, for instance a dynamic getter property on an object that throws an error when being computed.The app side workaround is to ensure that such a case is not possible. Ensure all values returned from a function exposed over the context bridge are supported and that any objects returned from functions do not have dynamic getters that can throw exceptions.
Auditing your exposed API is likely to be quite difficult so we strongly recommend you update to a patched version of Electron.
25.0.0-alpha.2
24.0.1
23.2.3
22.3.6
If you have any questions or comments about this advisory, email us at security@electronjs.org
Electron vulnerable to out-of-package code execution when launched with arbitrary cwd
Apps that are launched as command line executables are impacted. E.g. if your app exposes itself in the path as myapp --help
Specifically this issue can only be exploited if the following conditions are met:
This makes the risk quite low, in fact normally issues of this kind are considered outside of our threat model as similar to Chromium we exclude Physically Local Attacks but given the ability for this issue to bypass certain protections like ASAR Integrity it is being treated with higher importance. Please bear this in mind when reporting similar issues in the future.
There are no app side workarounds, you must update to a patched version of Electron.
26.0.0-beta.13
25.5.0
24.7.1
23.3.13
22.3.19
If you have any questions or comments about this advisory, email us at security@electronjs.org
ASAR Integrity bypass via filetype confusion in electron
This only impacts apps that have the embeddedAsarIntegrityValidation
and onlyLoadAppFromAsar
fuses enabled. Apps without these fuses enabled are not impacted. This issue is specific to macOS as these fuses are only currently supported on macOS.
Specifically this issue can only be exploited if your app is launched from a filesystem the attacker has write access too. i.e. the ability to edit files inside the resources
folder in your app installation on Windows which these fuses are supposed to protect against.
There are no app side workarounds, you must update to a patched version of Electron.
27.0.0-alpha.7
26.2.1
25.8.1
24.8.3
22.3.24
If you have any questions or comments about this advisory, email us at security@electronjs.org
Electron affected by libvpx's heap buffer overflow in vp8 encoding
Heap buffer overflow in vp8 encoding in libvpx in Google Chrome prior to 117.0.5938.132 and libvpx 1.13.1 allowed a remote attacker to potentially exploit heap corruption via a crafted HTML page.
Electron vulnerable to Heap Buffer Overflow in NativeImage
The nativeImage.createFromPath()
and nativeImage.createFromBuffer()
functions call a function downstream that is vulnerable to a heap buffer overflow. An Electron program that uses either of the affected functions is vulnerable to a buffer overflow if an attacker is in control of the image's height, width, and contents.
There are no app-side workarounds for this issue. You must update your Electron version to be protected.
v28.3.2
v29.3.3
v30.0.3
If you have any questions or comments about this advisory, email us at security@electronjs.org.
Electron has ASAR Integrity Bypass via resource modification
This only impacts apps that have the embeddedAsarIntegrityValidation
and onlyLoadAppFromAsar
fuses enabled. Apps without these fuses enabled are not impacted.
Specifically this issue can only be exploited if your app is launched from a filesystem the attacker has write access too. i.e. the ability to edit files inside the resources
folder in your app installation on Windows which these fuses are supposed to protect against.
There are no app side workarounds, you must update to a patched version of Electron.
38.0.0-beta.6
37.3.1
36.8.1
35.7.5
If you have any questions or comments about this advisory, email us at security@electronjs.org
Got allows a redirect to a UNIX socket
The got package before 11.8.5 and 12.1.0 for Node.js allows a redirect to a UNIX socket.
Prototype Pollution in minimist
Affected versions of minimist
are vulnerable to prototype pollution. Arguments are not properly sanitized, allowing an attacker to modify the prototype of Object
, causing the addition or modification of an existing property that will exist on all objects.
Parsing the argument --__proto__.y=Polluted
adds a y
property with value Polluted
to all objects. The argument --__proto__=Polluted
raises and uncaught error and crashes the application.
This is exploitable if attackers have control over the arguments being passed to minimist
.
Upgrade to versions 0.2.1, 1.2.3 or later.
Prototype Pollution in minimist
Minimist prior to 1.2.6 and 0.2.4 is vulnerable to Prototype Pollution via file index.js
, function setKey()
(lines 69-95).