GHSA-xj5x-m3f3-5x3h

Suggest an improvement
Source
https://github.com/advisories/GHSA-xj5x-m3f3-5x3h
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-xj5x-m3f3-5x3h/GHSA-xj5x-m3f3-5x3h.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-xj5x-m3f3-5x3h
Aliases
  • CVE-2026-34778
Published
2026-04-03T02:44:59Z
Modified
2026-04-06T23:20:03.666450Z
Severity
  • 5.9 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:N CVSS Calculator
Summary
Electron: Service worker can spoof executeJavaScript IPC replies
Details

Impact

A service worker running in a session could spoof reply messages on the internal IPC channel used by webContents.executeJavaScript() and related methods, causing the main-process promise to resolve with attacker-controlled data.

Apps are only affected if they have service workers registered and use the result of webContents.executeJavaScript() (or webFrameMain.executeJavaScript()) in security-sensitive decisions.

Workarounds

Do not trust the return value of webContents.executeJavaScript() for security decisions. Use dedicated, validated IPC channels for security-relevant communication with renderers.

Fixed Versions

  • 41.0.0
  • 40.8.1
  • 39.8.1
  • 38.8.6

For more information

If there are any questions or comments about this advisory, please email security@electronjs.org

Database specific
{
    "severity": "MODERATE",
    "cwe_ids": [
        "CWE-290",
        "CWE-345"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-04-03T02:44:59Z",
    "nvd_published_at": "2026-04-04T00:16:19Z"
}
References

Affected packages

npm / electron

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
38.8.6

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-xj5x-m3f3-5x3h/GHSA-xj5x-m3f3-5x3h.json"

npm / electron

Package

Affected ranges

Type
SEMVER
Events
Introduced
39.0.0-alpha.1
Fixed
39.8.1

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-xj5x-m3f3-5x3h/GHSA-xj5x-m3f3-5x3h.json"

npm / electron

Package

Affected ranges

Type
SEMVER
Events
Introduced
40.0.0-alpha.1
Fixed
40.8.1

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-xj5x-m3f3-5x3h/GHSA-xj5x-m3f3-5x3h.json"

npm / electron

Package

Affected ranges

Type
SEMVER
Events
Introduced
41.0.0-alpha.1
Fixed
41.0.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-xj5x-m3f3-5x3h/GHSA-xj5x-m3f3-5x3h.json"