# CVE-2026-43940: electerm: Path traversal in electerm runWidget leads to arbitrary code execution

- Severity: High 8.4 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.17%, higher than 6% of CVEs (2026-12-01)
- Published: 2026-05-08T02:58:05.646Z
- Modified: 2026-11-11T23:10:00.263Z
- Also known as: GHSA-f77v-9vpc-6pjm
- Weaknesses: CWE-22, CWE-829
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- electerm electerm: < 3.7.16
- electerm (npm): before 3.7.16
- electerm_project electerm: before 3.7.16

## Every score

- GitHub_M: CVSS:3.1 8.4 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/electerm/electerm/security/advisories/GHSA-f77v-9vpc-6pjm> (mitigation, vendor-advisory, web)
- <https://github.com/electerm/electerm/releases/tag/v3.7.16> (release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-43940> (advisory)
- <https://github.com/electerm/electerm> (package)

## Sources

- CVE List: [CVE-2026-43940](https://www.cve.org/CVERecord?id=CVE-2026-43940), CVE Terms of Use, modified 2026-05-08
- GitHub Advisory Database: [GHSA-f77v-9vpc-6pjm](https://github.com/advisories/GHSA-f77v-9vpc-6pjm), CC-BY-4.0, modified 2026-05-08
- NVD: [CVE-2026-43940](https://nvd.nist.gov/vuln/detail/CVE-2026-43940), Public domain, modified 2026-11-11

---

Page: https://cve.day/CVE-2026-43940 · Whole record: https://cve.day/CVE-2026-43940.json · Rebuilt by cve.day 2026-11-25T22:59:20.953Z
