GHSA-9pf5-hg6p-4pwp

Suggest an improvement
Source
https://github.com/advisories/GHSA-9pf5-hg6p-4pwp
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-9pf5-hg6p-4pwp/GHSA-9pf5-hg6p-4pwp.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-9pf5-hg6p-4pwp
Aliases
Published
2026-08-05T15:36:09Z
Modified
2026-08-05T15:56:01Z
Severity
  • 5.9 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N CVSS Calculator
Summary
Electron: Permission Check Handler Receives Main Frame Origin Instead of Requesting Iframe Origin
Details

Impact

For 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.

Apps 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.

Workarounds

Check details.securityOrigin instead of requestingOrigin for these permissions, or do not delegate device permissions to untrusted iframes.

Fixed Versions

  • 42.0.0-beta.1
  • 41.2.0
  • 40.9.0
  • 39.8.7

For more information

If you have any questions or comments about this advisory, email Electron at security@electronjs.org

Database specific
{
    "cwe_ids": [
        "CWE-346"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-08-05T15:36:09Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
}
References

Affected packages

npm / electron

Package

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
39.8.7

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-9pf5-hg6p-4pwp/GHSA-9pf5-hg6p-4pwp.json"

npm / electron

Package

Affected ranges

Type
SEMVER
Events
Introduced
40.0.0-alpha.1
Fixed
40.9.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-9pf5-hg6p-4pwp/GHSA-9pf5-hg6p-4pwp.json"

npm / electron

Package

Affected ranges

Type
SEMVER
Events
Introduced
41.0.0-alpha.1
Fixed
41.2.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-9pf5-hg6p-4pwp/GHSA-9pf5-hg6p-4pwp.json"

npm / electron

Package

Affected ranges

Type
SEMVER
Events
Introduced
42.0.0-alpha.1
Fixed
42.0.0-beta.1

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-9pf5-hg6p-4pwp/GHSA-9pf5-hg6p-4pwp.json"