Loading...
Skip to main content

CVE-2026-43940 — Vulnerability in electerm — CVE Details

CRITICAL

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

Published May 8, 2026Updated May 8, 2026Source: osv

Summary

### 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: ```javascript 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 - [electerm GitHub Repository](https://github.com/electerm/electerm) - [electerm Security Policy](https://github.com/electerm/electerm/security) - Vulnerability details originally reported by external researcher (PoC confirmed on v3.7.9, Win10).

Advisory Timeline

  • First published May 8, 2026 (157 days ago).
  • Last revised May 8, 2026 — 0 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

npm
Update electerm to 3.7.16 or later
npm install electerm@3.7.16

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: npm (1).

PackageEcosystemAffectedFixed In
electerm
npm
All versions3.7.16

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

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

Frequently Asked Questions

What is CVE-2026-43940?
Electerm runWidget has a path traversal that leads to arbitrary code execution This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
How do I check if my project is affected by CVE-2026-43940?
CVE-2026-43940 affects electerm. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-43940 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.8

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-f77v-9vpc-6pjm

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies