Field NotesMarch 2026
Localhost is not a boundary: a browser tab is also a local client of your agent gateway
In January and February 2026, four OpenClaw advisories described one path. A public web page, running in the user's own browser, reached a gateway and helper services bound to loopback. We reconstruct each finding from the advisories, patches and researchers' write-ups, trace the class back to 2007, and give a test table for eight trust assumptions plus a review checklist.
In this piece
On 26 January 2026 Ethiack reported a flaw to the maintainers of OpenClaw: a user visits a web page, and the attacker can run commands on the machine that hosts the agent, even when the gateway listens only locally1. OpenClaw is a self-hosted personal AI agent, first called Clawdbot and renamed in January 2026 to Moltbot and then OpenClaw2. It connects to messaging apps, calendars and developer tools and acts on the user's behalf3. The advisory states the cause: binding to loopback does not help, because the victim's own browser makes the connection4. A month later Oasis Security published a second route: script on a web page guesses the gateway password, then registers itself as a trusted device3.
OpenClaw's documentation says that gateway.bind: "loopback" is the default and that with it "only local clients can connect"5. At the network layer that is true. The question is who counts as a local client: the command-line tool, the desktop app, and script from any website in any tab of the user's browser.
Our claim: binding a control interface to loopback (127.0.0.1 and ::1) settles which interface a packet arrives on. It does not settle who sent it. Once a browser on the same machine can open a WebSocket or send a request to that interface, loopback is not an authentication boundary. Personal agents still put a control plane that runs commands, reads messages and holds credentials behind that assumption. The claim can be refuted: if mainstream browsers blocked every request from a public page to loopback by default, WebSocket included, with no one-click prompt, we would have to rewrite it. At our dateline, 10 March 2026, the browser documentation we read does not say that.
01What the gateway trusted: four advisories, one by one#
As Oasis describes it, the core of OpenClaw is the gateway: a local WebSocket server that handles authentication, sessions, configuration and orchestration of the agent. Other devices register as nodes and expose capabilities such as running system commands. Clients authenticate with a token or a password3. By default the gateway listens locally on TCP 18789, and the browser-based Control UI talks to it2. New devices go through pairing, which the documentation says is approved automatically for local connections from loopback5.
Ethiack reports the
ReportgatewayUrlflaw at 18:02 UTC1Fix commit for the Control UI9
Fix
Releaseopenclaw@2026.1.29reaches npm at 04:49 UTC11Advisory GHSA-g8p2-7wf7-98mq published4
Advisory
Each cell below is the advisory's own account. The labels W1 to W4 are ours.
| Label | Advisory | Affected → fixed | What the component trusted | What a web page could do | What the fix changed |
|---|---|---|---|---|---|
| W1 | GHSA-g8p2-7wf7-98mq; CVE-2026-25253, CVSS 3.1 score 8.8420 | <= 2026.1.28 → 2026.1.29 | The Control UI trusted gatewayUrl from the query string, connected on load, and sent the stored gateway token in the connect message | With the token, connect to the victim's local gateway, change configuration (sandbox, tool policy), invoke privileged actions | The user must confirm a new gateway URL |
| W2 | GHSA-mr32-vwc2-5j6h; CVE-2026-28458623 | >= 2026.1.20, < 2026.2.1 → 2026.2.1 | The Browser Relay /cdp WebSocket (default ws://127.0.0.1:18792/cdp) checked only that the TCP peer was loopback: no shared secret, no block on cross-origin browser requests | With the extension installed and active: read cookies from other tabs, run JavaScript in other tabs | A per-instance secret header; upgrades rejected when Origin is present and is not chrome-extension:// |
| W3 | GHSA-3fqr-4cg8-h96q; CVE-2026-263177 | <= 2026.2.13 → 2026.2.14 | The browser-control service bound to loopback; its state-changing HTTP routes did not validate Origin or Referer | Open tabs, start or stop the browser, change storage and cookies | POST, PUT, PATCH and DELETE rejected when Origin or Referer is not loopback, or on Sec-Fetch-Site: cross-site |
| W4 | GHSA-jmmg-jqc7-5qf4 (ClawJacked); no CVE id on the advisory page8 | <= 2026.2.24 → 2026.2.25 | Origin checks not enforced for some non-Control-UI client ids; loopback exempt from password-failure throttling; silent local pairing open to browser-origin non-Control-UI clients | After a correct guess, an authenticated operator session with that role's control-plane methods | Origin checks for all direct browser WebSocket clients; browser-origin failures always throttled; no silent pairing for non-Control-UI browser clients |
W1: the token follows the URL#
Ethiack pointed its own AI penetration-testing agent at a self-hosted instance, found the issue in about 1 hour 40 minutes, reported it on 26 January and published on 29 January1. Mav Levin of depthfirst published on 1 February and notes that another person reported the same bug19.
In the browser, the Control UI accepts gatewayUrl from the URL, stores it and connects at once; the connect message carries the token, which goes to the attacker's server19. At the gateway, both write-ups say the WebSocket server did not validate the Origin header, so script on the attacker's page could connect to the local gateway and authenticate with the stolen token191.
depthfirst adds that the stolen token carried the operator.admin and operator.approvals scopes, and that both the prompt before dangerous commands and the setting that runs commands inside a container could be switched off through the same API19. Our reading: approval prompts and the sandbox were settings on the control plane, not a separate line of defence.
The fix, merged on 28 January, changed five files and 63 lines, all under ui/, and added a confirmation dialog9. In the gateway's handshake handler at tags v2026.1.29 and v2026.2.1 the Origin header is only written to the log; an origin check appears at v2026.2.210. Version 2026.1.29 also removed the gateway auth mode none24; from that tag to v2026.2.13 the auth code knows only token and password modes25. If our reading is right, this implies that after the W1 fix a page from any origin could still start a WebSocket handshake with the local gateway, though it could not log in without the token or the password.
W2 and W3: side services that check only the peer address#
OpenClaw also opens services on loopback so that the agent can drive a browser. The Browser Relay in W2 relays Chrome DevTools Protocol (CDP) messages for a Chrome extension6; W3 concerns the HTTP routes of the browser-control service7. One sentence in the W3 advisory summarises the class:
Loopback binding reduces remote exposure but does not prevent browser-initiated requests from malicious origins7.
The W3 fix depends on headers that browsers send, and the advisory also recommends token or password auth7. A header check stops a browser, not a local program that omits those headers; RFC 6455 notes that non-browser clients can send a fake Origin15.
W4: three local exceptions make one path#
W4 starts from the state that W1 left. The origin check added at v2026.2.2 ran on one condition: the client id or mode in the connect message was the Control UI or Webchat. The connecting side fills in those fields, and the condition was unchanged at v2026.2.2410.
The second exception is throttling. The configuration reference says auth.rateLimit.exemptLoopback defaults to true21. Oasis says failed attempts from localhost were not counted, throttled or logged, and that in its lab it sustained hundreds of password guesses per second from browser JavaScript3. The third exception is pairing: a new device on a local connection was approved with no prompt35.
The documentation gives a reason for one exception: automatic pairing keeps same-host clients smooth5. Together the three form the path that Oasis describes3.
Oasis writes that any website could take full control of a developer's agent, which with typical integrations equals full workstation compromise3. The advisory rates the issue high but stresses its conditions: password auth mode, a user who opens attacker-controlled content, and a password guessable in a feasible number of attempts. It says this is not, by itself, an unauthenticated internet-exposed remote code execution issue8. The documentation says the onboarding wizard generates a token by default5; a user with that random token is outside those conditions. We found no figure for how many users chose a password instead.
The advisory does not discuss mode none, which the 2026.2.19 changelog allows again as an explicit setting for intentionally open loopback setups24. The auth code at that tag accepts that mode with no token or password25; we did not test it.
The fix commit changes each behaviour in one place21. A request with an Origin header and no proxy headers always gets the origin check. Connections with an Origin use a separate limiter that never exempts loopback. Silent pairing remains only for local connections without an Origin, and for the Control UI and Webchat. Connections that carry proxy headers skip the first rule; the advisory says trusted-proxy forwarded flows remain supported8. We did not test that branch.
For the fix, the advisory and Oasis give 2026.2.25, and Oasis says the fix came in under 24 hours3; the changelog entry names 2026.2.25 at that tag and 2026.2.26 from the next tag on24. npm published both on 26 February, at 04:16 and 23:59 UTC11, and the handshake code at tag v2026.2.25 contains the fix10. We use 2026.2.25.
Five stages of the origin check#
The status labels are our assessment of the source and the changelog; we ran no tests.
- 01
2026.1.29and earlierNo origin check in the handshake handler; the W1 fix changed only the Control UI109.
No check - 02
2026.2.2An origin check appears, only for clients that declare themselves as the Control UI or Webchat. It passes if the Origin is on the allowlist, if its host equals the Host header, or if both names are loopback26.
Keyed on declared fields - 03
2026.2.23The Host-header rule now needs the flag
Still keyed on declared fieldsdangerouslyAllowHostHeaderOriginFallback26; the documentation describes that flag as a downgrade of DNS rebinding hardening5. - 04
2026.2.25Every connection with an Origin and no proxy headers is checked; browser-origin failures are throttled; silent pairing is narrowed21.
Direct path fixed, proxy branch untested - 05
2026.3.2The loopback-origin allowance depends on an actual local socket client, not on what the Host header claims24. The proxy-header exception is still in the handshake code at
Per the changelog; proxy exception remainsv2026.3.810.
Other exits of the same assumption#
Loopback is treated as identity beyond the browser path. In the seven advisories below the caller is a reverse proxy or a local process, or a setting went wrong; what is trusted is the same.
| Advisory | Affected → fixed | What stood in for identity | Who the caller can be |
|---|---|---|---|
| GHSA-g55j-c2v4-pjcg; CVE-2026-2559327 | < 2026.1.20 → 2026.1.20 | A local client could write configuration through config.apply without authenticating | A local process |
| GHSA-xc7w-v5x6-cc8728 | < 2026.2.12 → 2026.2.12 | The BlueBubbles webhook treated a loopback peer as authenticated | A remote request forwarded by a reverse proxy |
| GHSA-qw99-grcx-4pvm29 | >= 2026.1.14-1, < 2026.2.12 → 2026.2.12 | The relay server treated the wildcard addresses 0.0.0.0 and :: as loopback | Hosts off the machine, when a wildcard was passed |
| GHSA-qpjj-47vm-64pj30 | >= 2026.1.5, <= 2026.2.9 → 2026.2.12 | Browser-control HTTP routes did not enforce auth when none was configured | Advisory: mainly local processes and local proxies |
| GHSA-h9g4-589h-68xv31 | >= 2026.1.29-beta.1, < 2026.2.14 → 2026.2.14 | The sandbox browser bridge server started without auth | Any local process |
| GHSA-pfv7-rr5m-qmv632 | <= 2026.2.17 → 2026.2.19 | The relay's /extension endpoint accepted unauthenticated WebSocket upgrades | A local process |
| GHSA-rchv-x836-w7xp22 | <= 2026.3.2 → 2026.3.7 | The macOS app put the gateway token and password in the Dashboard URL query string; the Control UI then stored the token in localStorage | Anyone who can read the browser URL or persistent storage |
One line in the fix notes of GHSA-pfv7 states the rule:
Keep loopback/origin checks as defense-in-depth, not as authentication32.
We read 11 of the repository's advisories, selected by title from its advisory list33.
02Lineage: 2007 to 2025#
Agents did not create this path.
| Year | Case | State of the local service | How a web page reached it |
|---|---|---|---|
| 2007 | DNS rebinding paper by Jackson and others34 | Resources behind a firewall rely on the browser's same-origin policy | Abstract: DNS rebinding subverts the same-origin policy and turns browsers into open network proxies |
| 2019 | Zoom client, CVE-2019-1345035 | The macOS client ran a web server on localhost port 19421 or 19424 | Any website could interact with it and force the user into a call with the camera on |
| 2024 | Ollama, CVE-2024-2822436 | The API before 0.1.29 | DNS rebinding gave remote access to the full API |
| 2024 | Oligo's 0.0.0.0 Day37 | Services listening locally on macOS and Linux | A public site used 0.0.0.0 in place of localhost or 127.0.0.1; Oligo says Chromium began to block it from version 128 |
| 2025 | MCP Inspector, CVE-2025-49596, CVSS 4.0 score 9.438 | Before 0.14.1, no authentication between the Inspector client and its proxy | A public site's request made the proxy run commands on the developer's machine; Oligo says DNS rebinding also worked |
| 2025 | Claude Code IDE extensions, CVE-2025-5288239 | The extension's WebSocket accepted connections from arbitrary origins | Connected when the user visited an attacker-controlled page; fixed in 1.0.24 |
PortSwigger defines cross-site WebSocket hijacking (CSWSH) as a handshake that relies solely on cookies for session handling and carries no other unpredictable value, so the attacker's page gains two-way interaction40. The OpenClaw gateway used a token or password in the connect message19, so W1 had to steal the token and W4 had to guess the password. We think the loopback address plays the cookie's part for automatic pairing and the throttling exemption: the browser presents nothing, and the connection receives the treatment.
The fixes repeat. MCP Inspector added a default session token and a check of allowed origins38. The Model Context Protocol specification of 2025-11-25 says Streamable HTTP servers must validate Origin to prevent DNS rebinding, should bind only to localhost when run locally, and should authenticate all connections41.
What browsers blocked in March 2026#
| Request from a public page to loopback | Chrome | Firefox |
|---|---|---|
fetch(), subresources, subframe navigation | Needs the user's permission from version 142 (stable on 28 October 2025)1213 | Version 147 (13 January 2026): restrictions on by default for users with Enhanced Tracking Protection set to Strict, in a progressive rollout42 |
| WebSocket | The guide says these connections are not yet gated and that Chrome plans to add them13; release notes 143 to 145 announce no change14 | The release notes do not list the request types covered42 |
The permission is a prompt the user can accept, not a block. Ethiack wrote in January that on stable Chrome 144 its exploit triggered no prompt because the relevant flag was off by default1, which does not match the Chrome 142 release notes12. We ran no test. The scope that Chrome's guide lists does not include the top-level navigation and the WebSocket that W1 uses13, so either explanation gives the same result. We did not check Safari.
RFC 6455 leaves the Origin decision to the server: one that does not validate it accepts connections from anywhere15. At the dateline, therefore, the local service has to make this check itself.
03A different failure: instances exposed to the internet#
Another set of numbers circulated in the same weeks: tens of thousands of OpenClaw instances reachable from the internet. There the attacker connects to an exposed instance directly, with no victim browser; the remedy is to stop binding publicly, add a firewall and require authentication. In W1 to W4 the gateway is not exposed, the path runs through the user's browser, and no internet scan can count such machines. Mixing the two suggests that a return to localhost is enough; the sections above show it is not.
| Source | Count | Unit and definition | Date | Method |
|---|---|---|---|---|
| Censys2 | 21,639 | Exposed instances; most still need a token to view and operate | 31 January 2026 | A query on HTML titles, for the older names Moltbot and clawdbot only |
| Bitsight16 | More than 30,000 | Distinct instances seen over 13 days, cumulative | 27 January to 8 February 2026 | A dedicated probe, scanning the default port 18789/tcp daily |
| SecurityScorecard, capture from the day of publication17 | 40,214 instances; 28,663 unique IPs; 76 countries; 12,812 flagged as open to remote code execution, stated as 63% | Instances counted by favicon match, 23,505 of them showing a control panel | 9 February 2026 | Favicon hashes, titles, certificates and HTML content; a first title search found 24,034 |
| SecurityScorecard, the same post as edited that evening43 | 42.9K unique IPs; 82 countries; 15.2K, stated as 35.4%; the 40,214 sentence unchanged | Summary figures rewritten | Modified 9 February 2026, 21:49 UTC, per page metadata; captured 6 March | The post says the dashboard refreshes every 15 minutes |
| The Register18 | More than 135,000 | Dashboard reading when the reporter wrote; about 40,000 at publication earlier that day | 9 February 2026 | Reported |
These counts cannot be ranked: the units differ, and so do the dates. The SecurityScorecard page also disagrees with itself; the arithmetic is ours. 12,812 is 44.7% of 28,663 and 31.9% of 40,214, not the stated 63%; in the rewritten version 15.2K is about 35.4% of 42.9K. The ASN table gives 4,574 unique IPs after deduplication, but its rows add up to 7,12217. The edited version says 53.3K instances correlate with prior breaches, more than the 40,214 instances the page still states43. We cannot tell which figure is right.
The post does not say how it judged instances vulnerable. From page titles (22% showed the current product name) it infers that most run pre-patch versions17; that is not a test.
The sources contradict each other on the default bind. SecurityScorecard writes that OpenClaw binds to 0.0.0.0:18789 out of the box17, and The Register repeats it18. Censys writes that the default is to listen locally2, and the documentation says loopback5. Bitsight's account lies between: setup asks for a bind mode, and users who want outside access choose the LAN option, which binds 0.0.0.0, or add a reverse proxy16. The repository holds one more cause: the Docker setup script and the Docker install guide default the bind to lan4445. We read the two statements as descriptions of different install paths; SecurityScorecard does not name the one it tested. We did not install the software.
The reverse proxy joins the two failures: the request comes from the internet, yet the gateway sees a loopback peer16. GHSA-xc7w is that case28.
04Model: eight trust assumptions of a local control plane#
In these advisories, local covers at least four callers: the user's own clients; script from any website in the browser; remote requests forwarded by a reverse proxy on the same machine; and other local processes. All four arrive from a loopback address. The maintainers' documentation sets a one-operator trust model and assumes that the host running OpenClaw is within a trusted OS and admin boundary49. We think that holds for the first caller and not for the second: the browser is inside the host, and the code it runs comes from outside.
The table is our model. Each test states only what to observe; we have not run them, and one real test can overturn any row.
| No. | Assumption | Why it fails | Test and expected result | Cases |
|---|---|---|---|---|
| A1 | Bound to loopback, so only my own programs reach it | Browser tabs and a reverse proxy on the same machine also connect from loopback | From a page on an unrelated origin, try a WebSocket handshake and a state-changing HTTP request on every listening port. Expected: rejected before any auth message is processed | W1 to W4, GHSA-xc7w |
| A2 | A connection from loopback needs fewer checks | Four kinds of caller share that address | List every branch that tests for a local client; repeat each with an Origin header and with forwarding headers. Expected: the same checks as a remote connection | W4, GHSA-g55j, GHSA-qpjj, GHSA-h9g4 |
| A3 | Only our own front end needs the origin check | The connecting side fills in both the client id and the Host header | Connect from an unrelated Origin with each known client id and with none; then make the Host header equal the Origin host. Expected: all rejected | W4; the origin check of 2026.2.2 |
| A4 | A token kept in the browser is safe | A URL parameter can change the connection target; query strings and localStorage persist | Load the Control UI with each URL parameter that changes the connection target; record the first message sent and inspect URL, history and storage. Expected: no credential sent without confirmation, no long-lived secret stored | W1, GHSA-rchv |
| A5 | A password means authentication | No minimum strength, and no throttling for local sources | Send wrong passwords in a row from loopback with an Origin header. Expected: throttled within the configured count, and logged | W4; Bitsight saw a single character accepted16 |
| A6 | Paired means that someone approved | Pairing on a local connection is approved automatically | Connect from a browser origin with a new device identity. Expected: an approval request the user can see | W4 |
| A7 | Approval prompts and the sandbox are a second line after login | Both are settings on the same control plane; a logged-in party can switch them off | With an operator token, try to disable approvals or change where commands run. Expected: confirmation through another channel, or a different privilege | W1 |
| A8 | The browser will block it | At the dateline Chrome's documentation still listed WebSocket as not gated | Repeat A1 on the current stable version of every browser you support. Expected: the same result in each | The lineage section |
One rule follows. Identify the caller first by something it holds, such as a random token or a device key. Then use where it speaks from, the Origin and the peer address, as a filter. In the reverse order the address becomes the identity.
What would overturn the model? The browser change named in the opening would remove A1 and A8 on the browser path; the reverse proxy and the local process would remain. A public test that completes a handshake from an unrelated origin on the direct path after 2026.2.25 would mean the last two rows of the stage table are wrong.
05Checklists: for those who run and those who build local control planes#
If you run OpenClaw#
- Upgrade. The W4 fix is in
2026.2.25and the Dashboard token fix in2026.3.7822. Then replace the gateway token: depthfirst advises rotation if a leak is suspected19, and before2026.3.7the token stayed in the browser'slocalStorage22. - Use the random token that the onboarding wizard generates, not a password of your own5.
- Run
openclaw security audit. Its checks include an unauthenticated loopback gateway behind a reverse proxy and a non-loopback Control UI with no origin allowlist5. - Do not enable gateway flags whose names begin with
dangerously, in particulardangerouslyAllowHostHeaderOriginFallbackanddangerouslyDisableDeviceAuth5. - Behind a reverse proxy, set
gateway.trustedProxies, make the proxy overwritex-forwarded-for, and block direct access to the gateway port5. - With Docker, check the value of
OPENCLAW_GATEWAY_BIND; the repository's setup script defaults tolan44. - Disable the Browser Relay extension when you do not use it. The W2 advisory lists this mitigation6.
- Review the list of paired devices and remove any you do not recognise;
openclaw devices removeexists from2026.2.1924.
If you build a local control plane#
Fill in one record for each listener. A field you cannot fill in is a task.
Field Question to answer
Bind address and port Which address is actually bound? Can a wildcard be treated as loopback?
Protocol and paths HTTP, WebSocket, or both? List every state-changing path
Caller identification Which secret is presented? Where is it made and stored? Can it appear in a URL?
Local exceptions Which checks are skipped for a loopback source? Reason and test for each
Origin check Does it run for every request with an Origin? Allowlist or Host header?
Proxy headers Which branch handles x-forwarded-* requests? Who can send those headers?
Failure handling Are failed logins counted, throttled and logged? Is loopback exempt?
Power after login Can the same credential switch off approvals, the sandbox or logging?
Browser tests On which browsers and versions were A1 and A3 run? Where are the results?- Require a random secret on every listener, including those only your own client should use.
- Check every request that carries an Origin header, without relying on a field the connecting side declares or on the Host header.
- Do not exempt loopback from throttling or logging; if you must, only for connections without an Origin header.
- Show the user a prompt when a new device pairs.
- Keep credentials out of URL query strings and persistent storage. Confirm any parameter that changes the connection target.
- Require confirmation through another channel before approvals are disabled or the execution location changes.