Critical

Electerm runWidget has a path traversal that leads to arbitrary code execution

  • Disclosed: 08.05.2026
  • Updated: 11.10.2026 10:22

Impact

The runWidget function in src/app/widgets/load-widget.js constructs a file path by directly concatenating user‑supplied widget identifiers without any sanitisation:

js
const file = `widget-${widgetId}.js`
const widget = require(path.join(__dirname, file))

Because runWidget is exposed to the renderer process via an asynchronous IPC handler with no input validation, an attacker who achieves JavaScript execution inside the renderer (for example, through a malicious plugin or a cross‑site scripting flaw in the built‑in webview) can abuse a path traversal (../) to load and execute an arbitrary JavaScript file anywhere on the victim’s filesystem. This gives the attacker local code execution with the full privileges of the electerm process, leading to complete system compromise.

Patches

Fixed in version >= 3.7.16

Workarounds

Until a patch is released:

  • Do not install or run untrusted plugins.
  • Avoid loading arbitrary web content inside electerm’s embedded webview (for example, disable any features that fetch and display remote HTML).
  • Run electerm in a sandboxed environment (e.g., with bubblewrap on Linux, AppArmor/SELinux profiles, or Windows sandboxed app execution) to limit the impact of any code execution.

Resources

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package electerm < 3.7.16 3.7.16

References

CVSS score 9.8/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness (CWE)
CWE-22, CWE-829
Platform
npm
Package
electerm
Disclosed
08.05.2026
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-f77v-9vpc-6pjm - CC BY 4.0

Vulnerability history: electerm

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (13) in the archive
Total entries
13
First → latest
01.2023 07.2026
Without a fix
4
Exploited in attacks
0

Severity breakdown

  • Critical 7
  • High 4
  • Medium 2

Disclosures per year

  1. 2023: 1
  2. 2024: 0
  3. 2025: 0
  4. 2026: 12
Severity:
  1. Critical · 7.8 CVE-2026-45353 >= 3.0.6, < 3.9.0 3.9.0
  2. Critical · 9.6 CVE-2026-43944 >= 3.0.6, < 3.8.8 3.8.8
  3. Electerm runWidget has a path traversal that leads to arbitrary code execution this entry
    Critical · 9.8 CVE-2026-43940 < 3.7.16 3.7.16
  4. Critical · 9.8 CVE-2026-41501 < 3.3.8 3.3.8
  5. Critical · 9.8 CVE-2020-23256 <= 1.3.22 no fix

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.