VDB
KO
HIGH 7.5

GHSA-2q4g-w47c-4674

Unpreventable top-level navigation

Details

### Impact The `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.

### Patches

* `11.0.0-beta.1` * `10.0.1` * `9.3.0` * `8.5.1`

### Workarounds Sandbox 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.

### For more information If you have any questions or comments about this advisory:

* Email us at security@electronjs.org

Are you affected?

Enter the version of the package you're using.

Affected packages

npm / electron
Introduced in: 8.0.0-beta.0 Fixed in: 8.5.1
Fix npm install electron@8.5.1
npm / electron
Introduced in: 9.0.0-beta.0 Fixed in: 9.3.0
Fix npm install electron@9.3.0
npm / electron
Introduced in: 10.0.0-beta.0 Fixed in: 10.0.1
Fix npm install electron@10.0.1

References