Electerm Arbitrary Protocol Execution Vulnerability
Electerm versions 3.8.15 and earlier are vulnerable to arbitrary code execution due to improper validation of URLs, allowing attackers to execute commands by tricking users into clicking malicious links in the terminal.
Electerm, a cross-platform terminal application, is vulnerable to an arbitrary protocol execution vulnerability (CVE-2026-43941) in versions 3.8.15 and earlier. This flaw stems from the application’s failure to properly validate URLs passed to the shell.openExternal function. An attacker who can control terminal output, such as through a compromised SSH server or a malicious plugin, can inject a crafted URI into the terminal. If a user clicks on this malicious link, Electerm will execute it using the operating system’s default protocol handler, potentially leading to code execution, data exfiltration, or other malicious activities. This vulnerability requires user interaction (clicking the link) to be exploited.
Attack Chain
- Attacker compromises a remote SSH server or injects malicious content into terminal output.
- The attacker crafts a malicious URI containing a dangerous protocol handler like
ms-msdt:,search-ms:, orfile://. - The malicious URI is printed to the Electerm terminal connected to the compromised SSH server.
- The victim, using Electerm, views the terminal output containing the malicious URI.
- The victim clicks on the malicious URI hyperlink in the Electerm terminal.
- Electerm’s
shell.openExternalfunction executes the URI without proper validation. - The operating system’s default protocol handler is invoked, executing the attacker’s payload (e.g., code execution via
ms-msdt:, NTLM hash leak viafile://). - Attacker achieves arbitrary code execution or exfiltrates sensitive information.
Impact
Successful exploitation of this vulnerability (CVE-2026-43941) could allow an attacker to execute arbitrary code on a victim’s machine. This could lead to complete system compromise, data theft, or the installation of malware. The vulnerability affects all Electerm users who interact with untrusted terminal outputs. The number of potential victims is dependent on Electerm’s user base. If successfully exploited, an attacker gains the privileges of the user running Electerm.
Recommendation
- Deploy the Sigma rule “Detect Electerm Suspicious URI Invocation” to detect attempts to exploit CVE-2026-43941 by monitoring process creations with unusual protocol handlers (see rule definition below).
- Apply the workaround to disable hyperlink rendering in electerm’s terminal settings until a patch is available.
- Monitor the electerm GitHub releases and security page for an update addressing this issue.
Detection coverage 2
Detect Electerm Suspicious URI Invocation
highDetects CVE-2026-43941 exploitation — spawning of processes with unusual protocol handlers potentially triggered by Electerm's `shell.openExternal`
Detect Electerm file:// URI usage
mediumDetects CVE-2026-43941 exploitation — Attempts to use file:// protocol handler to access local files from electerm
Detection queries are available on the platform. Get full rules →