---
id: "CVE-2026-113796"
kind: "vulnerability"
aliases: ["CVE-2026-113796", "GHSA-2p8c-gr87-2676"]
title: "Electron: SameSite cookie restrictions are not applied to windows opened from links"
severity: "medium"
cvss: 4.2
epss: 0.0018400000408291817
exploited: false
status: "open"
category: "package"
products: [{"name": "electron", "fixed": ["45.0.0-alpha.6"], "affected": ">= 45.0.0-alpha.1, < 45.0.0-alpha.6", "ecosystem": "npm"}, {"name": "electron", "fixed": ["44.3.0"], "affected": ">= 44.0.0-alpha.1, < 44.3.0", "ecosystem": "npm"}, {"name": "electron", "fixed": ["43.7.0"], "affected": ">= 43.0.0-alpha.1, < 43.7.0", "ecosystem": "npm"}, {"name": "electron", "fixed": ["42.11.3"], "affected": "< 42.11.3", "ecosystem": "npm"}]
ecosystems: ["npm"]
tags: ["cwe-352", "desktop-apps", "electron", "package", "untrusted-content"]
not_affected_if: ["default-config", "no-untrusted-content", "window-open-denied"]
published_at: "2026-10-21T17:18:24+00:00"
first_seen_at: "2026-10-23T19:11:31+00:00"
updated_at: "2026-10-23T21:57:29+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-2p8c-gr87-2676", "first_seen_at": "2026-10-23T19:11:31+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-113796", "first_seen_at": "2026-10-23T21:57:29+00:00"}]
---

# Electron: SameSite cookie restrictions are not applied to windows opened from links

Electron windows opened from links in a page are treated as same-site with the app, so SameSite=Strict cookies get sent on the request. A malicious page in the app can use this to make credentialed top-level requests to other sites that rely on SameSite cookies for CSRF protection.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- npm:electron affected >= 45.0.0-alpha.1, < 45.0.0-alpha.6 fixed 45.0.0-alpha.6
- npm:electron affected >= 44.0.0-alpha.1, < 44.3.0 fixed 44.3.0
- npm:electron affected >= 43.0.0-alpha.1, < 43.7.0 fixed 43.7.0
- npm:electron affected < 42.11.3 fixed 42.11.3

## How to check

Run `npm ls electron` to find the installed Electron version.
Check whether the app loads untrusted content and whether its window open handler (setWindowOpenHandler) returns deny for untrusted windows.

## Fix

Upgrade to electron 45.0.0-alpha.6, 44.3.0, 43.7.0, or 42.11.3, matching your major line.
As a workaround, return { action: 'deny' } from setWindowOpenHandler for windows opened by untrusted content.

## Timeline

- 2026-10-23T19:11:31+00:00 ghsa https://github.com/advisories/GHSA-2p8c-gr87-2676
- 2026-10-23T21:57:29+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-113796

## From the sources

### 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.6`
* `44.3.0`
* `43.7.0`
* `42.11.3`

### For more information

If you have any questions or comments about this advisory, email us at [security@electronjs.org](mailto:security@electronjs.org)

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
