Electron drops inherited HTML sandbox restrictions for popups opened through OpenURLFromTabGHSA-hq2x-r82h-9wj4
HIGHFix: electron/electron#52133GHSA-hq2x-r82h-9wj4 is a high-severity (CVSS 8.2) CWE-346 vulnerability in electron. A fix is available for electron — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-hq2x-r82h-9wj4.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
GHSA-hq2x-r82h-9wj4 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 394,803 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
electronnpmDescription
Impact
Popups opened from a sandboxed iframe through a link (for example target="_blank" or a middle-click) did not inherit the iframe's HTML sandbox restrictions. Content that was meant to run sandboxed could open a popup with the embedding app's full origin, gaining access to that origin's cookies, storage, and same-origin scripting.
Apps are only affected if they embed untrusted content in iframes sandboxed with allow-scripts allow-popups. Apps that do not embed untrusted content in sandboxed iframes are not affected.
Workarounds
Use setWindowOpenHandler on the parent WebContents to deny or constrain popups opened from sandboxed frames, or do not apply allow-popups to sandboxed iframes that render untrusted content.
Fixed Versions
43.0.042.5.241.10.4
For more information
If you have any questions or comments about this advisory, email us at [email protected]
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | electron | all versions | 41.10.4npm install electron@41.10.4 |
| 📦npm | electron | ≥ 42.0.0-alpha.1&&< 42.5.2 | 42.5.2npm install electron@42.5.2 |
| 📦npm | electron | ≥ 43.0.0-alpha.1&&< 43.0.0 | 43.0.0npm install electron@43.0.0 |
Affected Products
electronelectronjsDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for electron, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update electron to 41.10.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-hq2x-r82h-9wj4 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
A flaw was found in Electron where popup windows opened from a sandboxed iframe via navigation actions (such as target="_blank" links or middle-clicks) fail to inherit the iframe's sandbox security restrictions. An attacker controlling untrusted content in a sandboxed iframe configured with allow-scripts and…
Avoid embedding untrusted web content inside sandboxed iframes configured with allow-popups, or intercept new window navigation requests using setWindowOpenHandler to validate and deny unexpected popup requests.Source: Red Hat security advisory for GHSA-hq2x-r82h-9wj4 (CC BY 4.0)
Frequently Asked Questions
Is GHSA-hq2x-r82h-9wj4 in your dependencies?
Find it across npm, including transitive dependencies.