Security Digest · Vulnerability record

CVE-2026-43940: Electerm runWidget has a path traversal that leads to arbitrary code execution

electerm is an open-sourced terminal/ssh/sftp/telnet/serialport/RDP/VNC/Spice/ftp client.

CVSS 8.4 High EPSS 0.2% · p12

Should you act?

Normal patch cycle

No exploitation signal; fix it in your next routine update if you are affected. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.

  • No confirmed exploitation. It is not in CISA’s KEV catalog and CISA’s SSVC assessment records no known exploitation. That can change quickly after a public write-up; re-check if you are affected.
  • EPSS 0.2%, percentile 12: FIRST’s model estimates a 0.2% chance of exploitation activity in the next 30 days, higher than 12% of all scored CVEs (low). EPSS is a probability, not a verdict.
  • Needs local access needed. Lower urgency for most teams unless an attacker could already run code on the machine.
  • Only applies if your dependency tree includes electerm (npm) < 3.7.16, fixed in 3.7.16. Check your lockfile, including transitive dependencies.

What it is

electerm is an open-sourced terminal/ssh/sftp/telnet/serialport/RDP/VNC/Spice/ftp client. Prior to version 3.7.16, the runWidget function in src/app/widgets/load-widget.js constructs a file path by directly concatenating user‑supplied widget identifiers without any sanitisation. 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. This issue has been patched in version 3.7.16.

From the GitHub advisory

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:

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.

Weakness type: CWE-22, CWE-829.

Product: electerm (npm) · Assigned by: GitHub_M · Published: 2026-05-08

Affected and fixed versions

EcosystemPackageVulnerableFirst fixed
npmelecterm< 3.7.163.7.16
VendorProductAffected versions (per CVE record)
electermelecterm< 3.7.16

Severity scores

Scored byCVSSScoreVector
GitHub_M3.18.4 HighCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHub3.19.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Attack vector: local access needed
  • Attack complexity: low
  • Privileges required: none (no login)
  • User interaction: none
  • Scope: unchanged

CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.

Exploitation and urgency

  • CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
  • CISA SSVC assessment: exploitation none, automatable no, technical impact total.
  • FIRST EPSS (model of 2026-10-21): 0.22% probability of exploitation activity in the next 30 days; percentile 12.

Timeline

  • — CVE record last updated
  • — CVE record published by GitHub_M
  • — GitHub-reviewed advisory GHSA-f77v-9vpc-6pjm published (critical)

Sources and references

Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.

Vulnerability records

  1. GitHub Advisory GHSA-f77v-9vpc-6pjm github.com
  2. CVE.org record CVE-2026-43940 cve.org
  3. NVD entry CVE-2026-43940 nvd.nist.gov

Other references from the CVE record and advisory

  1. github.com github.com
  2. github.com github.com

Critical npm advisories · Today’s Security Digest