CVE-2026-43943
JSON

7.8high

electerm: RCE via malicious SSH server filename in openFileWithEditor

Severity
7.8high CVSS:3.1 by GitHub_M
Exploit likelihood
0.17% (higher than 5% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-q4p8-8j9m-8hxj

Description

electerm is an open-sourced terminal/ssh/sftp/telnet/serialport/RDP/VNC/Spice/ftp client. Prior to version 3.7.9, 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. This issue has been patched in version 3.7.9.

Affected

Product or packageVersionsReported by
electerm electerm< 3.7.9CVE List
electerm (npm)before 3.7.9GitHub Advisory Database
electerm_project electermbefore 3.7.9NVD

All scores

GitHub_M7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
GitHub8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Classification

CWE-78CWE-88

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

electerm is an open-sourced terminal/ssh/sftp/telnet/serialport/RDP/VNC/Spice/ftp client. Prior to version 3.7.9, 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. This issue has been patched in version 3.7.9.

GitHub Advisory Database
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.

<img width="1792" height="817" alt="1" src="https://github.com/user-attachments/assets/ddf78890-e95d-4fe7-981e-f86887677e8b" /> <img width="1648" height="941" alt="2" src="https://github.com/user-attachments/assets/cca2295b-2053-4d99-a464-be51eac2f5be" />
Patches

Fixed in version >= 3.7.9

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
NVD (es)

electerm es un cliente de terminal/ssh/sftp/telnet/puerto serie/RDP/VNC/Spice/ftp de código abierto. Antes de la versión 3.7.9, existe una vulnerabilidad de ejecución de código (RCE) en la función de electerm de SFTP abrir con editor del sistema o ’Editar con editor personalizado’. Cuando un usuario opta por editar un archivo usando abrir con editor del sistema o abrir con un editor personalizado, el nombre del archivo se pasa directamente a una línea de comandos sin sanitización. Un actor malicioso que controla el servidor SSH o el sistema operativo del usuario puede explotar esto creando un nombre de archivo que contenga metacaracteres de shell. Si una víctima intenta posteriormente editar este archivo, los comandos inyectados se ejecutan en su máquina con los privilegios del usuario. Esto podría permitir al atacante ejecutar código arbitrario, instalar malware o moverse lateralmente dentro de la red. Este problema ha sido parcheado en la versión 3.7.9.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-43943 changed 2026-05-08CVE Terms of Use
GitHub Advisory DatabaseGHSA-q4p8-8j9m-8hxj changed 2026-05-08CC-BY-4.0
NVDCVE-2026-43943 changed 2026-11-11Public domain