GitHub Advisoryadvisory · npm

GHSA-q4p8-8j9m-8hxj Electerm Security Vulnerability: RCE via malicious SSH server filename in openFileWithEditor

HIGH Published 2026-05-08 Modified 2026-05-08 Official page ↗
Aliases
CVE-2026-43943
Ecosystem
npm
Packages
electerm
Severity
High
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weaknesses
CWE-78, CWE-88
Reviewed
2026-05-08

Affected packages

• npm electerm: < 3.7.9 → fixed in 3.7.9

Description

Impact A code execution (RCE) vulnerability exists in electerm's SFTP open with system editor or "Edit with custom editor" feature. When a user opts to edit a file using open with system editor or open with a custom editor, the filename is passed directly into a command line without sanitization. A malicious actor controlling the SSH server or user OS can exploit this by crafting a filename containing shell metacharacters. If a victim subsequently attempts to edit this file, the injected commands are executed on their machine with the user's privileges. This could allow the attacker to run arbitrary code, install malware, or move laterally within the network. Patches Fixed in version >= 3.7.9 • https://github.com/electerm/electerm/commit/24ce7103e264cffe6eb5476c0506a2379e6f8333 Workarounds Until a patch is available, it is strongly recommended to: • Refrain from using the open with system editor or "Edit with custom editor" feature when connected to untrusted or unfamiliar SSH servers. • Consider using the built-in editor for viewing files, as this path may not be vulnerable to the same injection. • If the feature must be used, ensure connections are exclusively established with trusted servers and perform rigorous filename validation before editing. Resources • electerm GitHub Repository

Related

Alias · CVE (1)

  • CVE-2026-43943 electerm is an open-sourced terminal/ssh/sftp/telnet/serialport/RDP/VNC/Spice/ftp client. vulnerability

Weakness · CWE (2)

  • CWE-78 Improper Neutralization of Special Elements used in an OS Command weakness
  • CWE-88 Improper Neutralization of Argument Delimiters in a Command weakness

References