Packages / electron / Security
Compromised child renderer processes could obtain IPC access without nodeIntegrationInSubFrames being enabled
Affected releases · electron
- 17.x17.0.0 – 17.1.2Fixed in 17.2.0
- 16.x16.0.0 – 16.2.5Fixed in 16.2.6
- 15.x15.0.0 – 15.5.4Fixed in 15.5.5
- 14.x and older0.1.0 – 14.2.9No fix, no longer updated
On 17.x, the newest line:
npm install electron@17.2.0Not affected
45.0.0
1 release, latest
Affected
17.0.0 – 17.1.2
5 releases
Fixed
17.2.0 – 17.4.11
15 releases
Affected
16.0.0 – 16.2.5
19 releases
Fixed
16.2.6 – 16.2.8
3 releases
Affected
15.0.0 – 15.5.4
21 releases
Fixed
15.5.5 – 15.5.7
3 releases
Affected
14.0.0 – 14.2.9
15 releases
Affected
13.0.0 – 13.6.9
29 releases
Affected
12.0.0 – 12.2.3
26 releases
Affected
11.0.0 – 11.5.0
27 releases
Affected
10.0.0 – 10.4.7
22 releases
Affected
9.0.0 – 9.4.4
22 releases
Affected
8.0.0 – 8.5.5
25 releases
Affected
7.0.0 – 7.3.3
26 releases
Affected
6.0.0 – 6.1.12
26 releases
Affected
5.0.0 – 5.0.13
14 releases
Affected
4.0.0 – 4.2.12
28 releases
Affected
3.0.0 – 3.1.13
31 releases
Affected
2.0.0 – 2.0.18
19 releases
Affected
1.3.1 – 1.8.8
79 releases
Affected
0.1.0 – 0.4.1
8 releases
Is your project affected?
Paste your package.json, or type the range you declare for electron. It is read in your browser and sent nowhere.
What happens
Impact
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.
Patches
This has been patched and the following Electron versions contain the fix:
18.0.0-beta.617.2.016.2.615.5.5
Workarounds
Ensure that all IPC message handlers appropriately validate senderFrame as per our security tutorial here.
For more information
If you have any questions or comments about this advisory, email us at security@electronjs.org.