Skip to content

Electerm, Wails, and pain001-mcp wave (3 GHSAs): the browser rebinds into your local command tools

Source: 2026-11-25T03:30Z GitHub advisory wave. Entries: GHSA-44wm-wffw-6fq9 / CVE-2026-136630 (high 7.5, CWE-346, Electerm before 5.9.0), GHSA-45f4-wwcv-wj82 / CVE-2026-136628 (high 7.1, CWE-346, Wails before 2.17.1 on Linux), GHSA-r4x8-fc29-xm5r / CVE-2026-136620 (medium 7.1, CWE-73, pain001-mcp 0.0.72 before 0.0.80).

Wave in one line: three "trusted local bridge" components let an untrusted caller drive privileged operations: a DNS-rebinding web page reaches Electerm's unauthenticated MCP command tools on loopback port 30837 and executes OS commands locally and inside every open SSH session, a Wails desktop app's WebKitGTK IPC handler checks only the top-frame origin so any embedded iframe calls bound Go methods, and an MCP payment tool trusts a token the tool itself issued plus a caller-supplied output path so one staged batch writes attacker XML anywhere the server can write.

These three legs share one audit question: who is allowed to talk to this local bridge, and how does it decide? All three answers are wrong in different ways (header string-compare, top-frame-only check, self-issued confirmation), and all three are the standard targets when you find a developer workstation, a desktop app, or an MCP server inside scope.

Authorized validation only

Lab workstation VMs and disposable app builds only. The rebinding legs need an owned domain with TTL-0 A-record control and a lab browser on the target host. The MCP file-write leg needs a disposable server and marker files outside the intended output directory, never shell profiles, keys, or config. Never drive a real user's Electerm sessions or SSH connections.

1. Electerm MCP Server widget: browser-to-loopback via DNS rebinding, unauthenticated tool calls, RCE on the workstation and every open SSH tab

GHSA-44wm-wffw-6fq9 / CVE-2026-136630 (high 7.5, CWE-346): Electerm before 5.9.0 ships an MCP Server widget whose listener on port 30837 validates neither Host nor Origin against the actual TCP origin, so its MCP tools are callable unauthenticated. A page on an owned domain that rebinds its A record to 127.0.0.1 after the browser has loaded it can call the MCP tool interface from JavaScript: tool calls run OS commands on the local machine and inside any SSH sessions the user currently has open. One visited page becomes code execution on the workstation plus command execution on whatever servers the terminal happens to be connected to.

Operator rules:

  1. The Host-is-data-not-identity decision table applies before any loopback-guard reasoning. The gate compared a header string, not the socket peer. For every discovered loopback listener (Electerm 30837, and the growing list: Ollama 11434, Chroma 8000, JupyterLab 8888, MCP gateway ports, agent control planes), replay the same request from the lab browser with a foreign Host, a foreign Origin, no Host at all, and via rebinding A/AAAA alternation. Any cell that answers is browser-reachable from the internet with zero credentials.
  2. DNS rebinding beats CORS for these targets because the browser is the proxy. TTL-0 A record on an owned domain, first resolution public (page loads), second resolution 127.0.0.1 (fetch to http://rebind-domain:30837/... now dials loopback from the victim's own machine, same-origin to itself). No CSRF token is needed when the transport is a JSON-RPC MCP endpoint that never checks origin at all.
  3. MCP tool inventory is the recon step. Enumerate the tools exposed on any local MCP port you find (tools/list over the streamable-HTTP transport, or fetch the endpoint banner), then classify each tool by capability name (exec, run, command, ssh, shell, send). An MCP server on loopback is not "local-only" the moment a browser tab can reach it.
  4. Open SSH sessions multiply blast radius. The privilege that matters here is not the desktop user, it is everything the user is currently authenticated to. In red-team recon on developer workstations, enumerate terminal-multiplexer and SSH-client state; a bridge that injects into live sessions converts one workstation page-view into lateral movement on already-trusted channels.
  5. Sibling genealogy on this wiki: the hMailServer loopback REST rebinding leg (Oct 8 page, unthrottled local brute force), the DeepSeek Harness Host-header gate (Oct 8 wave, Host validated instead of TCP origin), and the Electerm IPC family on the May 8 electerm page (renderer-to-main). Same class, new carrier: the MCP widget.

2. Wails on Linux: the IPC origin check looks only at the top frame, so iframes invoke bound Go methods

GHSA-45f4-wwcv-wj82 / CVE-2026-136628 (high 7.1, CWE-346): Wails (Go desktop-app framework) before 2.17.1 on Linux implements its sendMessageToBackend WebKitGTK script message handler with an origin check that inspects the top-level URI rather than the frame that posted the message. Content loaded in an <iframe> inside the Wails window passes the check and can invoke bound Go methods and Wails runtime operations through the privileged IPC channel.

Operator rules:

  1. Desktop-app IPC is a browser attack surface with app privileges. Fingerprint Wails apps (WebView user-agent plus wails runtime markers, window.go.main.<App>.<Method> bootstrap in the frontend bundle). The audit question: does the message handler attribute the message to the sending frame (event.frame / URI per-frame on WebKitGTK) or to the window it arrived in? Top-frame-only checks make every iframe a privileged caller.
  2. iframe embedding inside the app window is the precondition to hunt for. Check whether the app loads third-party content (remote help pages, embedded webviews, user URLs rendered in-app). If any attacker-influenceable page renders in a frame inside the app, you have a privileged IPC caller without needing XSS in the app's own UI.
  3. Bound-method enumeration is the tool list. The frontend bundle names every bound Go method; grep the shipped JS assets for window.go and the runtime bridge. Each bound method is an RPC you can call from the frame context; classify them by name for file, process, network, and config sinks and prove one benign read-side call in a lab build.
  4. Cross-platform parity is a probe: the advisory is Linux/WebKitGTK-specific; re-run the iframe battery per platform because the Windows (WebView2) and macOS (WKWebView) bindings implement the check independently. A fix on one platform is not a fix.

3. pain001-mcp: the tool that confirms itself, trusts itself, and writes where you tell it

GHSA-r4x8-fc29-xm5r / CVE-2026-136620 (medium 7.1, CWE-73): pain001-mcp before 0.0.80 exposes a commit_payment_batch MCP tool whose output_file_path accepts absolute, dot-dot, or symlinked paths and is written with generated XML, with no containment to the intended output directory. The stage/commit split's safety check, a confirmation_token, is self-issued and reusable by the same caller, so the two-step design adds no human or server-side gate.

Operator rules:

  1. Self-issued confirmation tokens are rubber stamps. If step one of a two-phase tool returns the very credential that authorizes step two, and the same caller can replay it, the phase split is UI theater. Audit every MCP tool pair for this: who minted the token, is it bound to a session or human action, is it single-use?
  2. Caller-supplied output paths are the classic second sink. On any MCP tool with *_path, output_file, filename, or destination arguments, battery the standard shapes: absolute path, ../../, symlink to a target you planted. Prove writes only into a disposable tree (marker XML files), never into startup files, SSH material, or app config.
  3. MCP tool surfaces deserve the same argument fuzzing as HTTP APIs. For each tool, build the parameter matrix (required/optional, type, range) from tools/list schemas and run the traversal/SSRF/CRLF batteries per parameter class. The August 6 agent-authority page's lifecycle tracing applies: trace staged batch IDs and confirmation tokens through every create/read/save/delete sink, and compare REST versus MCP entry points for gate parity.
  4. Payment/finance MCP servers are high-value bounty targets because "writes files on server" plus generated-XML content is a stored-payload and config-corruption primitive near money flows; report with path-escape proof into your own tree only.

Tracked without publication

Akaunting 3.3.0 stored XSS via HTML tax names rendered by Vue v-html in an error notification (2cwv/126536) is the same v-html-in-viewer class as the Nov 24 rConfig leg, no new axis. GeoVision GV-EBD4700 ships an unencrypted default HTTPS private key in firmware (47fp/134875, on-path decrypt with fingerprint-pinning bypass, single firmware-leg classic). Perl Strong::Random state recovery from three outputs (7mj4/122093) and ai-memory wikisync predictable-symlink overwrite (3wpg/136625) tracked for sibling follow-ups.

Reporting heuristics

  1. For loopback-bridge bugs, the strongest proof is a request captured from a lab browser on the victim host via your owned rebinding domain, with the response body redacted to a status line plus one non-secret field. Include the exact Host/Origin/none decision table.
  2. For frame-origin IPC bugs, ship the mismatch table (top-frame URI check vs per-frame sender) plus one benign bound-method call that reads, not writes.
  3. For MCP path writes, show tools/list schema excerpt, the accepted path shapes matrix, and the marker file listing outside the output dir. State explicitly that no live payment record was touched.

November 25 follow-up: ruflo MCP bridge, the tool blocklist guarded the UI flow and the raw POST route shipped unauthenticated (CVE-2026-59726 / GHSA-c4hm-4h84-2cf3, critical, default Docker Compose)

The MCP bridge in ruflo/docker-compose.yml exposed POST /mcp with no authentication, bound to all interfaces by default. The terminal_execute tool blocklist was enforced only in the autopilot flow; POST /mcp and POST /mcp/:group bypassed it entirely. An unauthenticated network attacker calls tools/call → terminal_execute, gets a shell as node in the bridge container, reads every provider API key from the container env, spawns attacker-controlled swarms on the victim's keys, and poisons the AgentDB learning store to steer future AI outputs for all instance users. The fix set (ADR-166) binds loopback by default, fails closed on public bind without MCP_AUTH_TOKEN, adds constant-time bearer compare, and moves the tool gate server-side into executeTool.

Why it joins this page:

  1. Per-flow gates are bypassed by per-route entry points; enumerate the HTTP surface of every MCP server. The blocklist living in the autopilot code path while raw JSON-RPC routes skip it is the MCP version of the mode-switch gate-coverage rule: build the (route x tool x gate) table by POSTing tools/list then tools/call to every discovered path (/mcp, /mcp/:group, SSE endpoints) from an external host, not just through the vendor UI.
  2. Compose defaults are the deployment. 0.0.0.0 bind plus no auth plus MongoDB without --auth in the shipped compose file means every "lab" instance is an internet-facing tool-execution server. Before touching the protocol, fingerprint bind address and auth posture from outside: curl -X POST http://target:PORT/mcp with a bare initialize body is a zero-credential classification probe.
  3. Agent-state stores are a persistence target beyond the shell. Poisoning a shared learning/memory store (pattern → steers future agent outputs for all users) is implant persistence inside the agent's own knowledge plane. On authorized engagements, after proving tool execution, check whether tools write to shared stores and whether writes from one principal influence another principal's outputs; prove with an inert marker pattern and delete it.

November 25 second follow-up: EverOS desktop memory API takes file:// URIs and answers every origin with credentials, so any website you visit exfiltrates your SSH keys (CVE-2026-137091 / GHSA-p7vj-rwj3-438r, high, before 1.8.0)

EverOS ships a local HTTP API with a wildcard CORS policy that still sends credentials and an ingestion path that accepts file:// URIs without restriction. A malicious page (no CSRF token, no local access needed) calls POST /api/v2/memory/add with file:///home/user/.ssh/id_rsa-style URIs, then reads the parsed content back through POST /api/v2/memory/search, exfiltrating SSH keys and credential files to the attacker's origin; the same write API also lets the page alter or delete the user's stored memories.

Why it joins this page (same browser-to-desktop-API trust collapse as the Electerm leg, plus a second protocol axis):

  1. Access-Control-Allow-Origin: * plus Access-Control-Allow-Credentials: true on a desktop loopback API is a two-line audit. From the victim host's own browser, send one fetch('http://127.0.0.1:<port>/api/...', {credentials:'include'}) from an owned origin and read the response headers; any readable response is the finding. Desktop apps frequently ship CORS as if the loopback bind were the auth, forgetting the user's browser sits on the loopback already.
  2. file:// in a server-side fetch/ingest parameter is a local-file-read primitive regardless of CORS. Test every URL-accepting parameter (ingest, import, embed, webhook, preview) with a file:// URI against a synthetic canary file outside your owned directory; enumerate sibling schemes (gopher://, dict://, per the URL-policy page) at the same time.
  3. Write-then-read pairs turn one open parameter into full exfiltration. The add route alone looks like a write-only sink; the search route over the same store makes it a read oracle. On local APIs, map which read endpoints can return data written through other endpoints before scoring write-only findings as low.
  4. Validation boundaries: your own installed EverOS instance, a synthetic canary file (not your real key material) as the read target, and an owned localhost collector as the exfil sink.