CVE-2020-15174: Electron Unpreventable Top-level Navigation Vulnerability
HIGHCVE-2020-15174 is a HIGH (CVSS 7.5) unpreventable top-level navigation vulnerability (CWE-693: Protection Mechanism Failure) affecting Electron libraries in the npm ecosystem. The issue involves unpreventable top-level navigation. Remediation is available by upgrading affected packages to version 8.5.1, 9.3.0, 10.0.1.
CVE-2020-15174 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:L).
How to Fix CVE-2020-15174
To remediate this vulnerability, upgrade all affected Electron dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install electron@8.5.1
npm install electron@9.3.0
npm install electron@10.0.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls electron
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2020-15174, inspect your project dependencies using npm:
npm ls electron
Analyze the terminal output to locate any version of Electron in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 8.5.1), your application is affected.
Note: The npm ls electron command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-693: Protection Mechanism Failure, where the product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product. In Electron, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2020-15174 Affected Electron Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
electron
|
npm |
≥ 8.0.0-beta.0
< 8.5.1
|
8.5.1
|
|
electron
|
npm |
≥ 9.0.0-beta.0
< 9.3.0
|
9.3.0
|
|
electron
|
npm |
≥ 10.0.0-beta.0
< 10.0.1
|
10.0.1
|
References
Frequently Asked Questions
What is CVE-2020-15174?
Which Electron versions are affected?
What version fixes CVE-2020-15174?
Is electron affected?
What is the CVSS score of CVE-2020-15174?
What CWE is associated with CVE-2020-15174?
How can I check npm dependencies for CVE-2020-15174?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2q4g-w47c-4674",
"modified" : "2021-11-19T14:44:04Z",
"published" : "2020-10-06T14:24:04Z",
"aliases" : [ "CVE-2020-15174" ],
"summary" : "Unpreventable top-level navigation",
"details" : "### Impact\nThe `will-navigate` event that apps use to prevent navigations to unexpected destinations [as per our security recommendations](https://www.electronjs.org/docs/tutorial/security) can be bypassed when a sub-frame performs a top-frame navigation across sites.\n\n### Patches\n\n* `11.0.0-beta.1`\n* `10.0.1`\n* `9.3.0`\n* `8.5.1`\n\n### Workarounds\nSandbox all your iframes using the [`sandbox` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox). This will prevent them creating top-frame navigations and is good practice anyway.\n\n### For more information\nIf you have any questions or comments about this advisory:\n\n* Email us at security@electronjs.org",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "electron"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.0.0-beta.0"
}, {
"fixed" : "8.5.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "electron"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "9.0.0-beta.0"
}, {
"fixed" : "9.3.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "electron"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "10.0.0-beta.0"
}, {
"fixed" : "10.0.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/electron/electron/security/advisories/GHSA-2q4g-w47c-4674"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-15174"
}, {
"type" : "WEB",
"url" : "https://github.com/electron/electron/commit/18613925610ba319da7f497b6deed85ad712c59b"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/electron/electron"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20", "CWE-693" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-10-06T14:12:16Z",
"nvd_published_at" : "2020-10-06T18:15:00Z"
}
}