CVE-2026-70610

Electron: contextBridge object copy honors prototype setters

Published Aug 5, 2026 CVSS 3.1 · 5.4 Medium EPSS < 1% KEV · Not listed
Description
Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. Prior to 39.8.9, 40.9.2, 41.2.2, and 42.0.0-beta.4, objects copied across the contextBridge boundary from untrusted content could carry an attacker-influenced prototype, enabling prototype-pollution-style attacks against preload code despite context isolation being enabled. Apps are only affected if their preload code accepts object arguments from untrusted content and reads properties from them without own-property checks, while apps that only accept primitive arguments or validate object arguments are not affected. This issue is fixed in 39.8.9, 40.9.2, 41.2.2, and 42.0.0-beta.4.

Analysis

AI-generated

Technical impact

Electron enables desktop applications to exchange objects between a renderer process and a preload script via the contextBridge API. The description indicates that in earlier releases objects copied across the boundary honored prototype setters, which implies that an attacker can inject malicious properties into the prototype chain of objects passed from untrusted content. Based on this, it is inferred that such prototype pollution could lead to arbitrary code execution or privilege escalation within the preload environment, because the preload code may use unsuspecting properties to perform sensitive operations. The weakness is a classic prototype‑pollution flaw (CWE‑1321).

Affected Systems

Any Electron installation using a build older than 39.8.9, 40.9.2, 41.2.2, or 42.0.0‑beta.4 is vulnerable. The affected product is the Electron framework for cross‑platform desktop applications.

Risk and Exploitability

The CVSS score of 5.4 reflects a moderate severity due to the need for local, untrusted input to flow to the preload script. EPSS data is not available, and the vulnerability is not listed in the CISA KEV catalog, suggesting that attested exploitation is not currently known. Based on the description, it is inferred that an attacker could exploit the flaw by delivering a crafted object from renderer to preload, which would enable prototype pollution and potentially compromise the entire application without requiring user interaction. The risk is lower for applications that restrict or validate all objects passed to preload, yet any lack of validation creates a viable attack path.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Electron to the latest patched release (39.8.9, 40.9.2, 41.2.2, or 42.0.0‑beta.4 or later).
  • If an upgrade is not immediately possible, modify preload logic to reject or sanitize objects received from renderer: only accept primitives or validate objects using own‑property checks (e.g., Object.hasOwnProperty) and reject objects that expose non‑own properties.
  • When passing objects to the preload, use a clone that strips prototype information such as JSON.parse(JSON.stringify(obj)) or Object.assign(Object.create(null), obj) to eliminate prototype pollution before use.

Generated by OpenCVE AI on August 5, 2026 at 20:35 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-ff2p-hmqr-hxm4 Electron: contextBridge object copy honors prototype setters
History
Type Values Removed Values Added
First Time appeared Electronjs
Electronjs electron
CPEs cpe:2.3:a:electronjs:electron:*:*:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:42.0.0:alpha1:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:42.0.0:alpha2:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:42.0.0:alpha3:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:42.0.0:alpha4:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:42.0.0:alpha5:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:42.0.0:alpha6:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:42.0.0:beta1:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:42.0.0:beta2:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:42.0.0:beta3:*:*:*:node.js:*:*
Vendors & Products Electronjs
Electronjs electron
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Electron
Electron electron
Vendors & Products Electron
Electron electron
Type Values Removed Values Added
Description Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. Prior to 39.8.9, 40.9.2, 41.2.2, and 42.0.0-beta.4, objects copied across the contextBridge boundary from untrusted content could carry an attacker-influenced prototype, enabling prototype-pollution-style attacks against preload code despite context isolation being enabled. Apps are only affected if their preload code accepts object arguments from untrusted content and reads properties from them without own-property checks, while apps that only accept primitive arguments or validate object arguments are not affected. This issue is fixed in 39.8.9, 40.9.2, 41.2.2, and 42.0.0-beta.4.
Title Electron: contextBridge object copy honors prototype setters
Weaknesses CWE-1321
References
Metrics cvssV3_1

{'score': 5.4, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N'}

Weaknesses
  • CWE-1321

    Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Aug 6, 2026, 2:31 PM
Reserved
Aug 4, 2026, 7:50 PM
Status
Analyzed
Published
Aug 5, 2026, 6:17 PM
Modified
Oct 8, 2026, 1:53 PM