CVE-2018-15685 Electron webPreferences vulnerability can be used to perform remote code execution
Attackers can achieve remote code execution in Electron apps using IFRAMEs when nativeWindowOpen or sandbox options are enabled.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2018-15685?
CVE-2018-15685 is a high-severity code injection vulnerability in Electronjs Electron, published on 23 Aug 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
GitHub Electron 1.7.15, 1.8.7, 2.0.7, and 3.0.0-beta.6, in certain scenarios involving IFRAME elements and "nativeWindowOpen: true" or "sandbox: true" options, is affected by a WebPreferences vulnerability that can be leveraged to perform remote code execution.
Weakness: CWE-1188
Which versions are affected by CVE-2018-15685?
8 open source packages ship an affected version, including electron. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
electron npm | From 1.7.0 | 1.7.16 |
electron npm | From 1.7.0 | 1.7.16 |
electron npm | From 1.8.0 | 1.8.8 |
electron npm | From 1.8.0 | 1.8.8 |
electron npm | From 2.0.0 | 2.0.8 |
electron npm | From 2.0.0 | 2.0.8 |
2 more packages
electron npm | From 3.0.0-beta.1 | 3.0.0-beta.7 |
electron npm | From 3.0.0-beta.1 | 3.0.0-beta.7 |
Products include Electronjs Electron.
How do I fix CVE-2018-15685?
Upgrade electron to a fixed version for your release line: 1.7.16, 1.8.8, 2.0.8 or 3.0.0-beta.7.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2018-15685 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2018-15685 exists.
Public exploit code: 1 Exploit-DB entry.
Other vulnerabilities in Electronjs Electron
- CVE-2017-16151 Chromium Remote Code Execution in electron
- CVE-2018-1000118 Electron protocol handler browser vulnerable to Command Injection
- CVE-2026-34780 Electron: Context Isolation bypass via contextBridge VideoFrame transfer
- CVE-2026-102676 Electron: <webview> can enable Node.js integration in Web Workers despite embedder restrictions
- CVE-2026-102673 Electron drops inherited HTML sandbox restrictions for popups opened through OpenURLFromTab
Sources
Also known as GHSA-hv9c-qwqg-qj3v.