GHSA-ff2p-hmqr-hxm4 CVE-2026-70610
Electron: contextBridge object copy honors prototype setters
- Severity
- 5.4 / 10
- Medium · CVSS 3.1
- Exploit chance (EPSS)
- 0.56%
- Chance of exploitation in the next 30 days. Higher than 46.86% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-1321 Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
- Fix
39.8.9- Upgrade electron to this version or later
Description
Impact
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. Apps that only accept primitive arguments, or that validate object arguments, are not affected.
Workarounds
Validate objects received from untrusted content with own-property checks (Object.hasOwn), or copy them onto a null-prototype object before use.
Fixed Versions
42.0.0-beta.441.2.240.9.239.8.9
For more information
If you have any questions or comments about this advisory, email Electron at security@electronjs.org
Affected versions
npm
| Package | Vulnerable | Fixed in |
|---|---|---|
| electron | < 39.8.9 |
39.8.9 |
| electron | >= 40.0.0-alpha.1, < 40.9.2 |
40.9.2 |
| electron | >= 41.0.0-alpha.1, < 41.2.2 |
41.2.2 |
| electron | >= 42.0.0-alpha.1, < 42.0.0-beta.4 |
42.0.0-beta.4 |
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.9
- npm
npm install electron@39.8.9- yarn
yarn add electron@39.8.9- pnpm
pnpm add electron@39.8.9
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-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
The product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype.
How to prevent it
- Implementation: By freezing the object prototype first (for example, Object.freeze(Object.prototype)), modification of the prototype becomes impossible.
- Architecture and Design: By blocking modifications of attributes that resolve to object prototype, such as proto or prototype, this weakness can be mitigated.
- Implementation: When handling untrusted objects, validating using a schema can be used.
- Implementation: By using an object without prototypes (via Object.create(null) ), adding object prototype attributes by accessing the prototype via the special attributes becomes impossible, mitigating this weakness.
- Implementation: Map can be used instead of objects in most cases. If Map methods are used instead of object attributes, it is not possible to access the object prototype or modify it.
References
Packages
Other links
- github.com/electron/electron/security/advisories/GHSA-ff2p-hmqr-hxm4
- github.com/electron/electron/pull/51083
- github.com/electron/electron/pull/51084
- github.com/electron/electron/pull/51085
- github.com/electron/electron/pull/51086
- github.com/electron/electron/commit/17d5d26499cd279fab48f5f26527f8edc02a7713
- github.com/electron/electron/commit/23a6efb714dec80e2cf45d3054d18d701162e4dd
- github.com/electron/electron/commit/4ac50292d552fb510eb778392620c85308770a55
- github.com/electron/electron/commit/5b699544cbbed51bedb7c60d75c8c42be5825737
- github.com/electron/electron/releases/tag/v39.8.9
- github.com/electron/electron/releases/tag/v40.9.2
- github.com/electron/electron/releases/tag/v41.2.2
- github.com/electron/electron/releases/tag/v42.0.0-beta.4
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why 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 |
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