Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. electron
  4. ›
  5. CVE-2026-34778

CVE-2026-34778: Electron: Service worker can spoof executeJavaScript IPC replies

April 3, 2026 (updated April 6, 2026)

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.

References

  • github.com/advisories/GHSA-xj5x-m3f3-5x3h
  • github.com/electron/electron
  • github.com/electron/electron/security/advisories/GHSA-xj5x-m3f3-5x3h
  • nvd.nist.gov/vuln/detail/CVE-2026-34778

Code Behaviors & Features

Detect and mitigate CVE-2026-34778 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 38.8.6, all versions starting from 39.0.0-alpha.1 before 39.8.1, all versions starting from 40.0.0-alpha.1 before 40.8.1, all versions starting from 41.0.0-alpha.1 before 41.0.0

Fixed versions

  • 38.8.6
  • 39.8.1
  • 40.8.1
  • 41.0.0

Solution

Upgrade to versions 38.8.6, 39.8.1, 40.8.1, 41.0.0 or above.

Impact 5.9 MEDIUM

CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-290: Authentication Bypass by Spoofing
  • CWE-345: Insufficient Verification of Data Authenticity

Source file

npm/electron/CVE-2026-34778.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 09 May 2026 12:18:07 +0000.