Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-59804

CVE-2026-59804: Midscene Bridge Authentication Bypass Flaw

CVE-2026-59804 is an authentication bypass and CORS misconfiguration flaw in Midscene Bridge Server that lets attackers hijack sessions and inject commands. This article covers technical details, affected versions, and mitigation.

Published:

CVE-2026-59804 Overview

CVE-2026-59804 is a missing authentication vulnerability [CWE-306] in the Midscene Bridge Server through version 1.10.3. The Socket.IO server performs no Origin header validation and requires no authentication token. Unauthenticated remote attackers can hijack active bridge sessions by opening a cross-origin WebSocket connection from any web page the victim visits. Successful exploitation lets attackers seize the single-client slot, intercept and inject automation commands, exfiltrate command-payload data, or terminate the server via the MIDSCENE_BRIDGE_SIGNAL_KILL query parameter. The issue is fixed in commit 86f4118.

Critical Impact

Attackers can hijack browser automation sessions and inject arbitrary commands into the victim's active workflow through a drive-by web visit.

Affected Products

  • Midscene Bridge Server versions through 1.10.3
  • @midscene/web-integration bridge-mode Socket.IO server component
  • Fixed in commit 86f4118d1d847041c63d79e347e08c87c3f1a882

Discovery Timeline

  • 2026-07-08 - CVE-2026-59804 published to NVD
  • 2026-07-08 - Last updated in NVD database

Technical Details for CVE-2026-59804

Vulnerability Analysis

Midscene Bridge Server runs a local Socket.IO service that brokers automation commands between a client tool and a browser session. The server accepts WebSocket upgrade requests without validating the Origin header and does not require any authentication token or shared secret. Any origin loaded in the victim's browser can initiate a Socket.IO handshake against the local endpoint.

Because the bridge exposes a single-client slot, an attacker connection displaces the legitimate client. The attacker then reads command payloads streamed to the bridge and can inject arbitrary automation commands into the active session. The service also honors a MIDSCENE_BRIDGE_SIGNAL_KILL query parameter that unconditionally shuts down the server, providing a denial-of-service primitive.

Root Cause

The root cause is missing authentication combined with a Cross-Origin Resource Sharing (CORS) misconfiguration in the Socket.IO server initialization. The server was constructed without an allowRequest handler or Origin allowlist, and no bearer token was required on the WebSocket handshake. Browsers do not apply the same-origin policy to WebSocket connections in the way they do to XHR, so a malicious page can freely open a socket to localhost on the bridge port.

Attack Vector

Exploitation requires user interaction: the victim must visit an attacker-controlled or compromised web page while the bridge server is running locally. That page opens a Socket.IO client connection to the loopback bridge endpoint, completes the handshake, and immediately supplants the authorized client. From there the attacker relays or forges automation events, exfiltrates command data, or triggers MIDSCENE_BRIDGE_SIGNAL_KILL to terminate the server.

The upstream fix introduces Origin-based access control in packages/web-integration/src/bridge-mode/io-server.ts:

typescript
-import { createServer } from 'node:http';
+import {
+  type IncomingMessage,
+  type ServerResponse,
+  createServer,
+} from 'node:http';
 import { sleep } from '@midscene/core/utils';
+import { getDebug } from '@midscene/shared/logger';
 import { logMsg } from '@midscene/shared/utils';
 import { Server, type Socket as ServerSocket } from 'socket.io';
 import { io as ClientIO } from 'socket.io-client';

Source: GitHub commit 86f4118

Detection Methods for CVE-2026-59804

Indicators of Compromise

  • Unexpected WebSocket handshake requests to the local Midscene bridge port originating from browser tabs with non-development Origins.
  • Socket.IO connect events on the bridge server where the previously connected legitimate client is abruptly disconnected and replaced.
  • HTTP requests to the bridge endpoint containing the MIDSCENE_BRIDGE_SIGNAL_KILL query parameter.
  • Abnormal automation command sequences that do not match the operator's workflow, particularly command payloads sent to attacker-controlled destinations.

Detection Strategies

  • Enable verbose Socket.IO server logging and alert on connections whose Origin header does not match approved local development URLs.
  • Inspect process command lines and network telemetry on developer endpoints for Midscene versions at or below 1.10.3.
  • Correlate browser process network flows to localhost bridge ports with concurrent visits to untrusted domains.

Monitoring Recommendations

  • Track outbound connections from bridge server processes for anomalous exfiltration of automation payload data.
  • Monitor for process termination events on the Midscene bridge server that coincide with inbound HTTP requests carrying kill-signal query strings.
  • Maintain an inventory of endpoints running Midscene tooling and flag versions predating commit 86f4118.

How to Mitigate CVE-2026-59804

Immediate Actions Required

  • Upgrade Midscene to a build that includes commit 86f4118d1d847041c63d79e347e08c87c3f1a882 or later.
  • Stop the bridge server when it is not actively in use, and avoid browsing untrusted sites while it is running.
  • Audit developer workstations for the presence of vulnerable @midscene/web-integration packages at version 1.10.3 or earlier.

Patch Information

The fix is delivered in commit 86f4118, which adds Origin-based access control to the bridge Socket.IO server. See the GitHub commit, the pull request #2759, and the tracking issue #2752. Additional analysis is available in the VulnCheck security advisory.

Workarounds

  • Bind the bridge server exclusively to the loopback interface and add a host firewall rule blocking non-localhost connections.
  • Run the bridge behind a reverse proxy that enforces an Origin allowlist and injects a shared secret on the WebSocket handshake.
  • Restrict browser usage while the bridge is active by using a dedicated browser profile that does not visit untrusted sites.
bash
# Example: block non-loopback access to the bridge port using iptables
sudo iptables -A INPUT -p tcp --dport 3766 ! -s 127.0.0.1 -j DROP

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.