{"id":"CVE-2026-70599","aliases":["CVE-2026-70599","GHSA-9pf5-hg6p-4pwp"],"related":[],"kind":"vulnerability","state":"published","title":"Electron: Permission Check Handler Receives Main Frame Origin Instead of Requesting Iframe Origin","summary":"Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. Prior to 39.8.7, 40.9.0, 41.2.0, and 42.0.0-beta.1, serial-port and media permission checks made from an iframe passed the top-level frame origin to session.setPermissionCheckHandler instead of the requesting iframe origin. Origin-based handler logic could grant a cross-origin iframe device access intended only for the top-level origin. This issue is fixed in 39.8.7, 40.9.0, 41.2.0, and 42.0.0-beta.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. Prior to 39.8.7, 40.9.0, 41.2.0, and 42.0.0-beta.1, serial-port and media permission checks made from an iframe passed the top-level frame origin to session.setPermissionCheckHandler instead of the requesting iframe origin. Origin-based handler logic could grant a cross-origin iframe device access intended only for the top-level origin. This issue is fixed in 39.8.7, 40.9.0, 41.2.0, and 42.0.0-beta.1.","source":"cvelist"},{"lang":"en","text":"### Impact\nFor serial-port and media (camera / microphone) permission checks made from an iframe, the `requestingOrigin` passed to `session.setPermissionCheckHandler` was the top-level frame's origin rather than the requesting frame's. Origin-based handler logic could therefore grant a cross-origin iframe device access intended only for the top-level origin.\n\nApps are only affected if they use `setPermissionCheckHandler` with origin-based logic and embed cross-origin iframes with delegated device permissions. Apps that base the decision on `details.securityOrigin`, or that do not embed such iframes, are not affected.\n\n### Workarounds\nCheck `details.securityOrigin` instead of `requestingOrigin` for these permissions, or do not delegate device permissions to untrusted iframes.\n\n### Fixed Versions\n* `42.0.0-beta.1`\n* `41.2.0`\n* `40.9.0`\n* `39.8.7`\n\n### For more information\nIf you have any questions or comments about this advisory, email Electron at [security@electronjs.org](mailto:security@electronjs.org)","format":"markdown","source":"ghsa"}],"published":"2026-08-05T15:36:02.182Z","modified":"2026-10-08T13:54:19.333Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.9,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.9,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.9,"rating":"MEDIUM"}],"cwes":["CWE-346"],"affected":[{"ranges":[{"version":"< 39.8.7","status":"affected"},{"version":">= 40.0.0-alpha.1, < 40.9.0","status":"affected"},{"version":">= 41.0.0-alpha.1, < 41.2.0","status":"affected"},{"version":">= 42.0.0-alpha.1, < 42.0.0-beta.1","status":"affected"}],"vendor":"electron","product":"electron","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"39.8.7"}],"ecosystem":"npm","package":"electron","purl":"pkg:npm/electron","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"40.0.0-alpha.1","status":"affected","fixed":"40.9.0"}],"ecosystem":"npm","package":"electron","purl":"pkg:npm/electron","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"41.0.0-alpha.1","status":"affected","fixed":"41.2.0"}],"ecosystem":"npm","package":"electron","purl":"pkg:npm/electron","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"42.0.0-alpha.1","status":"affected","fixed":"42.0.0-beta.1"}],"ecosystem":"npm","package":"electron","purl":"pkg:npm/electron","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"39.8.7"},{"status":"affected","introduced":"40.0.0","fixed":"40.9.0"},{"status":"affected","introduced":"41.0.0","fixed":"41.2.1"},{"status":"affected","version":"42.0.0"},{"status":"affected","version":"42.0.0"},{"status":"affected","version":"42.0.0"},{"status":"affected","version":"42.0.0"},{"status":"affected","version":"42.0.0"},{"status":"affected","version":"42.0.0"},{"status":"affected","version":"42.0.0"},{"status":"affected","version":"42.0.0"}],"vendor":"electronjs","product":"electron","cpe":"cpe:2.3:a:electronjs:electron:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/electron/electron/security/advisories/GHSA-9pf5-hg6p-4pwp","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/electron/electron/commit/0cbdf2f0375466d701aa393c92e0ec29eb89ea6c","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/electron/electron","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-08-05T18:13:54.699Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-70599","url":"https://www.cve.org/CVERecord?id=CVE-2026-70599","licence":"CVE Terms of Use","modified":"2026-08-05T18:41:57.567Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-9pf5-hg6p-4pwp","url":"https://github.com/advisories/GHSA-9pf5-hg6p-4pwp","licence":"CC-BY-4.0","modified":"2026-08-05T15:56:01.262Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-70599","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-70599","licence":"Public domain","modified":"2026-10-08T13:54:19.333Z"}],"updatedAt":"2026-11-25T22:59:31.126Z","epss":{"score":0.00182,"percentile":0.08111,"date":"2026-12-01T12:00:22.000Z"}}