When an iframe requests fullscreen, pointerLock, keyboardLock, openExternal, or media permissions, the origin passed to session.setPermissionRequestHandler() was the top-level page's origin rather than the requesting iframe's origin. Apps that grant permissions based on the origin parameter or webContents.getURL() may inadvertently grant permissions to embedded third-party content.
The correct requesting URL remains available via details.requestingUrl. Apps that already check details.requestingUrl are not affected.
In your setPermissionRequestHandler, inspect details.requestingUrl rather than the origin parameter or webContents.getURL() when deciding whether to grant fullscreen, pointerLock, keyboardLock, openExternal, or media permissions.
41.0.040.8.139.8.138.8.6If there are any questions or comments about this advisory, please email security@electronjs.org
{
"github_reviewed": true,
"github_reviewed_at": "2026-04-03T02:44:26Z",
"severity": "MODERATE",
"nvd_published_at": null,
"cwe_ids": [
"CWE-346"
]
}