One click could take over an OpenClaw assistant
Strict rules refuse key steps
In January 2026, a disclosed OpenClaw bug showed that one malicious web page could steal the access token of an OpenClaw assistant, switch its safety approvals off and run commands on the person’s computer. With strict rules, Tego would refuse the published attack's commands: the assistant can only write and connect where you say. We reproduced the incident's steps under these rules to confirm it. The token theft and the change to the assistant’s own settings happen outside what Tego sees.
What happened?
OpenClaw, earlier named Clawdbot and Moltbot, is an open-source AI personal assistant that "runs locally on user devices and integrates with a wide range of messaging platforms", according to The Hacker News. Its core is the gateway, a program that runs all the time and takes commands over a WebSocket, a live two-way connection, on port 18789 by default. You manage it from a web page, the Control UI, according to the finder, depthfirst.
The bug was in that page. It took a gateway address from its own link (gatewayUrl) and connected on load, sending the stored gateway token, the gateway's password, to that address. The maintainers published advisory GHSA-g8p2-7wf7-98mq on 31 January 2026, rated High, 8.8 out of 10. The CVE record, CVE-2026-25253, followed on 1 February. The advisory and CVE say versions before 2026.1.29 are affected; depthfirst says up to v2026.1.24-1.
depthfirst described the chain:
- A person signed in to the Control UI opens a crafted link.
- The page sends the gateway token to the attacker's server.
- The attacker's page opens a connection from the same browser to the person's own gateway. Browsers send a page's origin with such a connection, but the server "doesn't validate the WebSocket origin header", so "the victim's browser acts as the bridge", even when the gateway listens only on the computer itself.
- The token carries admin rights. The script switches approvals off (
exec.approvals.set), so commands no longer wait for the person's yes. Then it changes the config (config.patch) to move shell tools out of their Docker container, a sealed box, and onto the computer itself. - One more call (
node.invokewithsystem.run) runs a command. The proof of concept ranbash -c 'echo hacked > /tmp/hacked'.
The chain "takes only milliseconds" after one page visit. Version 2026.1.29, released 30 January, makes the person confirm a new gateway address (fix commit). No source reports victims; some trackers list exploitation in the wild, which we could not confirm from a primary source.
Why didn't the usual safety catch it?
Every control sat inside the assistant. Approvals and the Docker sandbox were settings its own API could change, and the stolen token was allowed to change them. OpenClaw's exec approval docs now say approvals "are not a per-user auth boundary".
The advisory states the impact: "arbitrary config changes and code execution on the gateway host." depthfirst adds that a stolen token can mean reading text messages and Stripe API keys, depending on the setup.
How Tego handles it
Tego puts rules around a program and enforces them from outside it, with the Linux kernel. Run the gateway on Linux as its own user, under Tego, and no API call can switch those rules off.
The first steps happen where Tego can't help. The token leaks in the browser, which Tego doesn't watch. Tego sees connections, not what's inside them, so the missing origin check is invisible to it (Tego's known limits, item A4). Switching approvals off is the gateway writing its own settings folder, which it is allowed to write (A2).
What follows runs into Tego's rules. By default, Tego's built-in list of secret files refuses reads of ~/.ssh, ~/.aws, ~/.netrc and ~/.gnupg, where SSH, cloud and signing keys live. Side doors to the rest of the computer are refused too: the desktop's message bus (D-Bus), Docker's control socket, and, once the rules list any network hosts, services running on the computer itself (contract semantics).
How it could have been prevented
Upgrading fixes this bug. The habit that prevents this kind of harm doesn't depend on knowing it. Put the limits on an always-on assistant outside the assistant, where its own settings can't reach them: which folders it may change, which hosts it may reach, which programs it may start. Then a takeover of the assistant is a takeover of a fenced-in program.
Tego's strict setup does that here. The gateway may change files only in its own folder, ~/.openclaw. /tmp isn't in it, so echo hacked > /tmp/hacked fails, and so does a startup entry in ~/.bashrc, a systemd user unit (a background service that starts when you log in) or authorized_keys (the list of SSH keys allowed to log in). It may connect only to your model and messaging hosts, so a connection to the attacker's server is refused. Tokens you exported in your shell never reach it. After one normal run, Tego can list the programs the gateway really started and refuse every other one, so bash, curl, wget, ssh, crontab and python3 fail with a permission error if it never ran them (README).
Tego's strict setup is three built-in rule sets: the agent can't read your secrets, can only reach the hosts you list, and can only change files in the folders you name.
In Tego's rules file, that's:
extends: [tego/no-secrets, tego/no-prod, tego/repo-only-writes]
fs:
write: ["~/.openclaw/"] # the gateway's state folder
net:
allow: ["api.anthropic.com:443", "api.telegram.org:443"] # your model and messaging hosts
listen: ["tcp://127.0.0.1:18789"] # the Control UI, on loopbackSetup notes. Point OpenClaw's log file into ~/.openclaw/ with its logging.file setting, because the default log is in /tmp/openclaw/ (logging docs). This works without root (TIERS.md), on Linux 6.7 or later for the port rules; run tego doctor to check your machine first. Never allow docker: it hands work to a background service outside Tego's rules that Tego's operations guide treats as equal to root (OPERATIONS.md, "Host daemon sockets").
And run every OpenClaw process under Tego. OpenClaw can send commands to a separate "headless node host", and one started outside Tego runs commands with your full rights.
The honest limit: node stays allowed because the gateway is a Node program, so attacker code run as node -e or as a script in ~/.openclaw still runs, and it can read files beyond the secrets list, such as project folders and shell history, and send them out through the attacker's live session or the allowed hosts (A1).
The lesson
A control the agent's own API can switch off is a setting, not a boundary. Put the walls outside the agent, run every part of it under them, and still patch fast: upgrade to 2026.1.29 and rotate the leaked token.
Sources (14 links)
Checked on 5 November 2026.
- OpenClaw, advisory GHSA-g8p2-7wf7-98mq, 31 January 2026, and the fix commit.
- CVE Program, CVE-2026-25253 record, 1 February 2026.
- depthfirst, 1-Click RCE To Steal Your OpenClaw Data and Keys (CVE-2026-25253), 1 February 2026.
- The Hacker News, OpenClaw Bug Enables One-Click Remote Code Execution via Malicious Link, 2 February 2026.
- OpenClaw docs (current, not as of January): exec approvals and logging.
- Tego: README, TIERS.md, GAPS.md, contract semantics, contract schema, OPERATIONS.md, built-in deny_read list.
Read next
Previous teardown
An npm worm that plants rogue MCP servers
Default rules refuse key steps
Next teardown
The MCP server that blind-copied every email
A fake email tool quietly added a blind copy to every message.
Start here
Eleven agent incidents and the rule for each
Eleven agent incidents, each in one line.