CVE-2026-43943: Electerm Security Vulnerability: RCE via malicious SSH server filename in openFileWithEditor
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.
Published May 8, 2026
Affected packages
electerm
- Ecosystem
- npm
- Affected
- <= 3.7.8
- Fixed in
- 3.7.9
- Check
npm ls electerm
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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
Credited to osageling.
References
- https://github.com/electerm/electerm/security/advisories/GHSA-q4p8-8j9m-8hxj
- https://nvd.nist.gov/vuln/detail/CVE-2026-43943
- https://github.com/electerm/electerm/commit/24ce7103e264cffe6eb5476c0506a2379e6f8333
- https://github.com/electerm/electerm/releases/tag/v3.7.9
- https://github.com/advisories/GHSA-q4p8-8j9m-8hxj
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-49253
electerm has Path Traversal in Zmodem and Trzsz Download Filename Handling
high7.1Jul 2, 2026CVE-2026-49255
electerm has Command Injection in File System Operations (rmrf, mv, cp)
high8.8Jul 2, 2026CVE-2026-45058
Electerm: Importing unsafe bookmark data could lead to unsafe operation when clicking local type bookmark
critical9.4No fixMay 14, 2026CVE-2026-45353
Electerm Local code through electerm's single-instance socket
critical7.8May 14, 2026CVE-2026-45787
electerm's encrypt method not safe enough
medium6.0May 14, 2026CVE-2026-43940
Electerm runWidget has a path traversal that leads to arbitrary code execution
critical9.8May 8, 2026
