CVE-2026-136630 in Electerm
Summary
by MITRE • 11/25/2026
Electerm before 5.9.0 contains an origin validation vulnerability in the MCP Server widget that allows remote attackers to execute commands by bypassing Host and Origin checks through DNS rebinding. Attackers can lure users to a page that rebinds to 127.0.0.1 and calls unauthenticated MCP tools on port 30837 to run OS commands locally and on open SSH sessions.
If you want to get best quality of vulnerability data, you may have to visit VulDB.
Analysis
by VulDB Data Team • 11/25/2026
The vulnerability identified in Electerm versions prior to 5.9.0 represents a critical failure in origin validation mechanisms within the Model Context Protocol (MCP) Server widget, specifically leveraging DNS rebinding techniques to bypass security controls. This flaw allows remote attackers to execute arbitrary commands on the victim's local system by exploiting the trust relationship between the browser-based interface and the underlying application infrastructure. The core technical issue lies in the insufficient verification of HTTP Origin and Host headers during requests directed at the MCP Server, which listens on a specific local port, typically 30837. By manipulating DNS resolution through rebinding attacks, an adversary can trick the victim's web browser into sending maliciously crafted requests that appear to originate from localhost or other trusted internal addresses, thereby circumventing same-origin policy restrictions and authentication checks designed to protect these endpoints.
The operational impact of this vulnerability is severe, as it enables remote code execution with the privileges of the user running the Electerm application. Once an attacker lures a victim to a malicious webpage that performs DNS rebinding to resolve to 127.0.0.1, the browser can successfully communicate with the local MCP Server widget without triggering cross-origin resource sharing errors or authentication prompts. This allows the attacker to invoke unauthenticated MCP tools directly on the localhost interface. These tools are capable of executing operating system commands locally, effectively granting the attacker full control over the victim's machine within the context of that user account. Furthermore, if active SSH sessions are open within Electerm, the vulnerability extends its reach by allowing command execution through those established connections, potentially compromising remote systems and expanding the attack surface beyond the local host to include networked infrastructure accessible via these tunnels.
From a classification perspective, this vulnerability aligns with CWE-346, which describes an Origin Validation Error where trust is placed in untrusted data sources such as HTTP headers without adequate verification. It also relates closely to CWE-918, addressing Server-Side Request Forgery (SSRF) variants that leverage DNS rebinding to bypass network-level access controls. In terms of the MITRE ATT&CK framework, this attack vector corresponds to T1071 Application Layer Protocol for command and control communication and potentially T1621 API Abuse if the MCP tools are considered part of an application programming interface layer. The exploitation technique relies heavily on DNS rebinding, a method categorized under reconnaissance or initial access phases depending on whether it is used to gather information or directly execute payloads, often falling under techniques like T1078 Valid Accounts if combined with credential theft from open sessions.
Mitigation strategies must focus on strengthening origin validation and implementing robust defenses against DNS rebinding attacks. Developers should enforce strict Origin header checking that validates not just the hostname but also ensures it matches expected trusted domains explicitly, rather than relying solely on localhost resolution which is easily spoofed via DNS manipulation. Implementing additional security headers such as Content-Security-Policy with restrictive frame-ancestors and origin policies can help mitigate browser-based exploitation vectors. Additionally, binding services to specific network interfaces or using loopback addresses that are not accessible from external networks where possible reduces the attack surface. For users of affected versions, upgrading to Electerm version 5.9.0 or later is essential as it contains patches for this vulnerability. Until an upgrade can be performed, restricting access to local ports used by such services and ensuring no sensitive SSH sessions remain open unnecessarily can reduce exposure. Security teams should also monitor for unusual outbound connections from browsers to localhost endpoints that deviate from normal usage patterns, indicating potential exploitation attempts.