GHSA-2p8c-gr87-2676 CVE-2026-113796
Electron: SameSite cookie restrictions are not applied to windows opened from links
- Severity
- 4.2 / 10
- Medium · CVSS 3.1
- Exploit chance (EPSS)
- 0.22%
- Chance of exploitation in the next 30 days. Higher than 12.39% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-352 Cross-Site Request Forgery (CSRF)
- Fix
45.0.0-alpha.6- Upgrade electron to this version or later
Description
Impact
Pages opened into a new window from a link were loaded as if the app itself had navigated there rather than the page that contained the link, so the request was treated as same-site: SameSite=Strict cookies were sent and Sec-Fetch-Site did not identify the initiating page. Content shown in the app could use this to make a credentialed top-level request to another site that relies on SameSite cookies as a CSRF defence.
Apps are only affected if they load untrusted content and allow it to open new windows. Apps that deny new windows from untrusted content with setWindowOpenHandler are not affected.
Workarounds
Return { action: 'deny' } from setWindowOpenHandler for windows opened by untrusted content.
Fixed Versions
45.0.0-alpha.644.3.043.7.042.11.3
For more information
If you have any questions or comments about this advisory, email us at security@electronjs.org
Affected versions
npm
| Package | Vulnerable | Fixed in |
|---|---|---|
| electron | >= 45.0.0-alpha.1, < 45.0.0-alpha.6 |
45.0.0-alpha.6 |
| electron | >= 44.0.0-alpha.1, < 44.3.0 |
44.3.0 |
| electron | >= 43.0.0-alpha.1, < 43.7.0 |
43.7.0 |
| electron | < 42.11.3 |
42.11.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 → 45.0.0-alpha.6
- npm
npm install electron@45.0.0-alpha.6- yarn
yarn add electron@45.0.0-alpha.6- pnpm
pnpm add electron@45.0.0-alpha.6
Severity breakdown
CVSS 3.1 4.2
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- None
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Weakness
CWE-352: Cross-Site Request Forgery (CSRF)
The web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor.
How to prevent it
- Architecture and Design: Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482]. For example, use anti-CSRF packages such as the OWASP CSRFGuard. [REF-330] Another example is the ESAPI Session Management control, which includes a component for CSRF. [REF-45]
- Implementation: Ensure that the application is free of cross-site scripting issues (CWE-79), because most CSRF defenses can be bypassed using attacker-controlled script.
- Architecture and Design: Generate a unique nonce for each form, place the nonce into the form, and verify the nonce upon receipt of the form. Be sure that the nonce is not predictable (CWE-330). [REF-332]
- Architecture and Design: Identify especially dangerous operations. When the user performs a dangerous operation, send a separate confirmation request to ensure that the user intended to perform that operation.
- Architecture and Design: Use the "double-submitted cookie" method as described by Felten and Zeller: When a user visits a site, the site should generate a pseudorandom value and set it as a cookie on the user's machine. The site should require every form submission to include this value as a form value and also as a cookie value. When a POST request is sent to the site, the request should only be considered valid if the form value and the cookie value are the same. Because of the same-origin policy, an attacker cannot read or modify the value stored in the cookie. To successfully submit a form on behalf of the user, the attacker would have to correctly guess the pseudorandom value. If the pseudorandom value is cryptographically strong, this will be prohibitively difficult. This technique requires Javascript, so it may not work for browsers that have Javascript disabled. [REF-331]
- Architecture and Design: Do not use the GET method for any request that triggers a state change.
- Implementation: Check the HTTP Referer header to see if the request originated from an expected page. This could break legitimate functionality, because users or proxies may have disabled sending the Referer for privacy reasons.
References
Advisories
Packages
Other links
- github.com/electron/electron/security/advisories/GHSA-2p8c-gr87-2676
- github.com/electron/electron/pull/53721
- github.com/electron/electron/pull/53719
- github.com/electron/electron/pull/53718
- github.com/electron/electron/pull/53717
- github.com/electron/electron/pull/53683
- github.com/electron/electron/commit/a86ae4205ba2ba7ae60a6caa9d5d3a44321f2f9b
- github.com/electron/electron/commit/98940cb274bb6adcb7cdb2da2d4495ac83119670
- github.com/electron/electron/commit/652ef79ac79c6767b31e59b2f28d0d46114645e5
- github.com/electron/electron/commit/0e6aca0618eeae50a18cfd50548b8688820629ed
- github.com/electron/electron/commit/079b9b1594ee62c336adc3aa430d4c1cf62bd51e
- github.com/electron/electron/releases/tag/v42.11.3
- github.com/electron/electron/releases/tag/v43.7.0
- github.com/electron/electron/releases/tag/v44.3.0
- github.com/electron/electron/releases/tag/v45.0.0-alpha.6
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