GHSA-r5p7-gp4j-qhrx — electron
MEDIUMGHSA-r5p7-gp4j-qhrx is a medium-severity (CVSS 5.4) CWE-346 vulnerability in electron. A fix is available for electron — see the affected versions and patch details below.
Electron: Incorrect origin passed to permission request handler for iframe requests
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-r5p7-gp4j-qhrx.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
GHSA-r5p7-gp4j-qhrx by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 379,842 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
When an iframe requests fullscreen, pointerLock, keyboardLock, openExternal, or media permissions, the origin passed to session.setPermissionRequestHandler() was the top-level page's origin rather than the requesting iframe's origin. Apps that grant permissions based on the origin parameter or webContents.getURL() may inadvertently grant permissions to embedded third-party content.
The correct requesting URL remains available via details.requestingUrl. Apps that already check details.requestingUrl are not affected.
Workarounds
In your setPermissionRequestHandler, inspect details.requestingUrl rather than the origin parameter or webContents.getURL() when deciding whether to grant fullscreen, pointerLock, keyboardLock, openExternal, or media permissions.
Fixed Versions
41.0.040.8.139.8.138.8.6
For more information
If there are any questions or comments about this advisory, please email [email protected]
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | electron | all versions | 38.8.6npm install electron@38.8.6 |
| 📦npm | electron | ≥ 39.0.0-alpha.1&&< 39.8.1 | 39.8.1npm install electron@39.8.1 |
| 📦npm | electron | ≥ 40.0.0-alpha.1&&< 40.8.1 | 40.8.1npm install electron@40.8.1 |
| 📦npm | electron | ≥ 41.0.0-alpha.1&&< 41.0.0 | 41.0.0npm install electron@41.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 38.8.6 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-r5p7-gp4j-qhrx 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.
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.Source: Red Hat security advisory for GHSA-r5p7-gp4j-qhrx (CC BY 4.0)
Frequently Asked Questions
Is GHSA-r5p7-gp4j-qhrx in your dependencies?
Find it across npm, including transitive dependencies.