BrowserOS icon indicating copy to clipboard operation
BrowserOS copied to clipboard

Windows: MCP listens on all interfaces when remote access is disabled

Open DegradingAnt opened this issue 3 months ago • 2 comments

Issue Type

Both / Not sure

Operating System

Windows

Description of the bug

On Windows, two of the four BrowserOS neo ports bind to 0.0.0.0. One of them is 9011, the MCP proxy port. The other two ports bind to 127.0.0.1 in the same process tree.

The config file sets flags.allow_remote_in_mcp to false. The bind address does not follow that flag.

This is a hardening report, not a vulnerability report. I tested the request filter first, and it holds. A peer on the LAN interface gets the TCP connection accepted and then closed, with no HTTP response, in under one millisecond. A spoofed Host: 127.0.0.1 header does not defeat it. So the flag works, but it works at the request layer only. The socket still listens on every interface.

Four places in the product state loopback:

  1. The README says "BrowserOS neo runs on your machine, on 127.0.0.1".
  2. The MCP page in the app shows the endpoint as http://127.0.0.1:9011/mcp.
  3. The base URL override field rejects any value that is not loopback.
  4. config.json sets flags.allow_remote_in_mcp to false.

The name of that flag describes a bind decision. It currently controls a request filter instead.

Why this is still worth fixing:

  • A port scan from the LAN reports two open ports on the machine. The user reads that as an exposed browser.
  • The source check is the only control. A refactor of the request path removes it, and nothing else stops a remote caller.
  • Half of the sockets already bind correctly. One executable opens 9110 on loopback and 9011 on all interfaces, so the correct behavior is present in the same binary.

Related: #201, where a user asked for LAN access and the answer was that localhost-only is by design, with a toggle to come. This report is about the layer that toggle acts on.

Steps to Reproduce

  1. Install BrowserOS neo on Windows.
  2. Start the browser.
  3. Open PowerShell.
  4. Run this command:
Get-NetTCPConnection -State Listen | Where-Object { $_.LocalPort -in 9011,9012,9110,9210 } | Select-Object LocalPort, LocalAddress
  1. Read the LocalAddress column.
  2. Open %LOCALAPPDATA%\BrowserClaw\User Data\.browseros\config.json.
  3. Read the value of flags.allow_remote_in_mcp.

Result of step 4:

LocalPort LocalAddress   process
     9011 0.0.0.0        chrome
     9012 0.0.0.0        chrome
     9110 127.0.0.1      chrome
     9210 127.0.0.1      browseros-claw-server

Result of step 7: false. The same file holds the port numbers.

"flags": { "allow_remote_in_mcp": false },
"ports": { "cdp": 9110, "proxy": 9011, "server": 9210 }

Port 9012 does not appear in the config file.

BrowserOS Version

0.49.5.0 (Chromium 148.0.7988.97)

Additional Context

I also probed the endpoint, so that you can see what I did and did not find. Raw TCP, one request per row.

source      Host header          result
loopback    127.0.0.1:9011       HTTP 200, initialize succeeds
loopback    evil.test            HTTP 403 Forbidden
loopback    Origin: evil.test    HTTP 403 Forbidden
LAN IP      192.168.x.x:9011     connection accepted, 0 bytes, closed
LAN IP      127.0.0.1:9011       connection accepted, 0 bytes, closed
LAN IP      localhost:9011       connection accepted, 0 bytes, closed

The last three rows are the good news. The guard rejects a remote peer before HTTP parsing, and header spoofing does not get past it.

Suggested fix: bind ports.proxy to 127.0.0.1 when allow_remote_in_mcp is false, and apply the same rule to the component that opens 9012. The flag then controls both layers, and the four surfaces above become true.

DegradingAnt avatar Aug 23 '26 17:08 DegradingAnt

Confirming this behavior still occurs on a newer Windows installation (checked October 16, 2026).

Observed

  • BrowserOS neo MCP server identifies itself as browseros-neo version 0.0.72; installed BrowserClaw application path contains Chromium build 155.0.8311.26.
  • %LOCALAPPDATA%\BrowserClaw\User Data\.browseros\config.json has flags.allow_remote_in_mcp: false and ports cdp: 9110, proxy: 9010, server: 9211.
  • Get-NetTCPConnection -State Listen shows TCP ports 9010 and 9011 bound to 0.0.0.0, whereas 9110, 9210 and 9211 bind to 127.0.0.1.
  • A local MCP initialize request to http://127.0.0.1:9010/mcp succeeds (HTTP 200). I was also able to open a browser tab using the MCP tabs tool through localhost.

Local mitigation: Added a persistent Windows Defender Firewall inbound TCP block for ports 9010–9011 (all profiles). Verified that the rule is enabled, and that loopback MCP initialization still works afterward; SSH access was unaffected.

I did not test remote request bypass or successful access from a LAN peer, so this is corroborating evidence for the socket-binding/hardening issue, not a new vulnerability claim. Ideally, when remote MCP is disabled, these proxy listeners would bind to 127.0.0.1 by default, independent of firewall configuration.

Thanks for tracking this!

tatsumioga1 avatar Oct 16 '26 01:10 tatsumioga1

Status update on the proxy side, which is not yet covered by the server fix.

The loopback default for the Node agent HTTP server is being addressed in #3278, but on current main the Chromium-side MCP proxy still binds all interfaces by default: in packages/browseros/chromium_patches/chrome/browser/browseros/server/browseros_server_proxy.cc, the HTTP and HTTPS proxy listeners both bind 0.0.0.0, and when remote access is disabled non-loopback peers are only rejected after the connection is accepted. So the listening socket is still exposed on every interface — which is what this issue reports on Windows.

We had a fix for exactly this half in PR #3253. It was closed when the server-side files were folded into #3278 and we understood the remaining "allow remote" behavior would move behind a user-facing setting; that settings PR has not appeared yet, and it is not clear whether it will change the proxy's default bind at all. The diff of the proxy-side commit (3 files, +44/−20) is still viewable at https://github.com/browseros-ai/BrowserOS/pull/3253/files :

  • bind 127.0.0.1 by default; bind 0.0.0.0 only when the allow_remote_in_mcp preference is enabled;
  • call SetAllowRemote() before Start() so the first bind already uses the current preference value (previously the first bind used a stale value because SetAllowRemote() ran after Start());
  • rebuild the proxy (stop + start) when the preference changes, so a runtime toggle actually re-binds the listeners.

Happy to resubmit these three Chromium patch files as a standalone PR if the user-facing setting does not land with a loopback default on the proxy side, or now if that would help. Leaving this note here so #2424 is not silently considered resolved by #3278 alone.

WindriseAI avatar Nov 11 '26 05:11 WindriseAI