Electerm
electerm: RCE via malicious SSH server filename in openFileWithEditor
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 versions and mitigation
From the CVE record and the vendor's references.Affected
- < 3.7.9
Fixed in 3.7.9
Mitigation
Upgrade electerm to 3.7.9 or later.
References
- Vendor advisory github.com/electerm/electerm/security/advisori…
- Patch github.com/electerm/electerm/commit/24ce7103e2…
- Release notes github.com/electerm/electerm/releases/tag/v3.7…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.