Skip to content

GHSA-p2rr-rvmm-c5fp CVE-2026-70612

Electron: Sandboxed iframes can launch external protocol handlers

Medium npm
Severity
5.4 / 10
Medium · CVSS 3.1
Exploit chance (EPSS)
0.43%
Chance of exploitation in the next 30 days. Higher than 37.18% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-284 Improper Access Control
Fix
39.8.8
Upgrade electron to this version or later

Description

Impact

Requests to open external protocol URLs from web content did not take iframe sandbox restrictions into account, so a sandboxed iframe could cause an OS-registered external application to be launched. The frame's sandbox state was also not made available to the app's permission handlers.

Apps are only affected if they render untrusted content in sandboxed iframes and grant the openExternal permission (granted by default when no setPermissionRequestHandler is installed). Apps whose permission handler denies openExternal for untrusted content are not affected.

Workarounds

Install a setPermissionRequestHandler that denies the openExternal permission for untrusted content.

Fixed Versions

  • 42.0.0-beta.3
  • 41.2.1
  • 40.9.0
  • 39.8.8

For more information

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

Affected versions

npm

PackageVulnerableFixed in
electron
< 39.8.8
39.8.8
electron
>= 40.0.0-alpha.1, < 40.9.0
40.9.0
electron
>= 41.0.0-alpha.1, < 41.2.1
41.2.1
electron
>= 42.0.0-alpha.1, < 42.0.0-beta.3
42.0.0-beta.3

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

electron npm → 39.8.8

npm
npm install electron@39.8.8
yarn
yarn add electron@39.8.8
pnpm
pnpm add electron@39.8.8

Severity breakdown

CVSS 3.1 5.4

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

Weakness

CWE-284: Improper Access Control

The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.

How to prevent it
  • Architecture and Design, Operation: Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.
  • Architecture and Design: Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-qqvq-6xgj-jw8g
Electron affected by libvpx's heap buffer overflow in vp8 encoding
High Known exploited Also affects electron
GHSA-j7hp-h8jx-5ppr
libwebp: OOB write in BuildHuffmanTable
High Known exploited Also affects electron
GHSA-995f-9x5r-2rcj
Heap buffer overflow in GPU
Critical Known exploited Also affects electron
GHSA-jr5w-w6x2-84p9
Electron: Mitigation for compromised eMudhra intermediate certificates
High Also affects electron
GHSA-h3v5-h239-pg29
Electron: Off-screen rendering on macOS trusts GPU-supplied frame geometry
Low Also affects electron
GHSA-3qxv-5xgr-q7w9
Electron: Frame subscription trusts GPU-supplied frame geometry
Low Also affects electron
GHSA-997q-gvvc-jwmx
Electron: openExternal permission requests can be attributed to the wrong origin
Medium Also affects electron
GHSA-fw47-9c62-h3vw
Electron: HID and USB permission checks can be attributed to the wrong origin
Medium Also affects electron
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor