OpenClaw Security: The Real Risks and How to Lock It Down

OpenClaw is only as safe as the way you set it up. The real-world problems so far have come from four places: Gateways left open to the internet, malicious skills, a one-click bug that stole login tokens, and prompt injection hiding in emails and web pages.

You can shut down most of that in an afternoon. Update to the latest version, keep the Gateway on loopback with token auth, pair every sender, restrict the tools, vet every skill and run openclaw security audit.

Here’s what actually happened, and the exact settings that fix each one.

Why OpenClaw security is a bigger deal than most apps

OpenClaw is an open-source AI assistant you run on your own machine and talk to through chat apps. Depending on how you set up its tools, it can run commands on your computer and message people for you.

So anyone who gets control of it gets all of that too.

The project is upfront about its trust model. Each Gateway is one trust boundary, built for a single operator or a team that trusts each other. It isn’t meant to keep hostile users apart. If you need that, the answer is separate Gateways, ideally on separate OS users or machines.

Why does that matter to you? Because if you let other people message your bot, they’re inside your trust boundary.

I run Claude Code agents on a Mac Mini at home that works as an always-on worker, and I’ve run it in skip-permissions mode for speed.

What makes that OK for me is the boring stuff: backups before edits and scoped helper scripts, so a bad call can only reach so far.

OpenClaw needs the same thinking. It’s the same idea as Claude Code’s permission rules: decide up front what the agent can do on its own and what has to come to you first.

The real risks, with what actually happened

1. Gateways exposed to the internet

This is the big one. In February 2026, SecurityScorecard counted 40,214 exposed OpenClaw instances across 28,663 IP addresses, and said 12,812 of them were exploitable by remote code execution. Infosecurity Magazine put it down to widespread misconfiguration.

On a regular install today, the Gateway binds to loopback, which means only the machine itself can connect. The trouble starts when you change that so you can reach it from your phone or another computer, or when you run it in a container.

Container images default to an exposed bind.

2. Malicious skills on ClawHub

Skills are add-ons, and ClawHub is the public place to get them. In early February 2026, Koi Security audited 2,857 skills and found 341 malicious ones, according to The Hacker News. Most were one campaign, nicknamed ClawHavoc.

The trick was simple. A skill posing as something useful, like a crypto tracker or a YouTube tool, had a “Prerequisites” section telling Mac users to paste a script into Terminal. That script installed Atomic Stealer, a Mac infostealer that goes after your passwords and keys.

Some other skills hid backdoors in code that otherwise worked fine.

At the time, all you needed to publish on ClawHub was a GitHub account at least a week old.

OpenClaw responded by scanning every ClawHub upload with VirusTotal starting February 7, 2026. Malicious skills get blocked and suspicious ones get a warning label. But OpenClaw says itself that the scan is “not a silver bullet.”

Plain-English instructions that steer an agent somewhere bad won’t trip a virus scanner.

3. The one-click token theft bug (CVE-2026-25253)

This one’s sneaky.

The Control UI trusted a gatewayUrl value in the link and sent your Gateway token to whatever server it pointed at. Click a bad link and an attacker had operator access, which they could use to turn off approvals and run commands on your machine.

It worked even on loopback-only setups, because your own browser made the connection. It’s rated CVSS 8.8 and was fixed in version 2026.1.29, released January 30, 2026.

Lesson: loopback isn’t enough on its own. Stay updated.

4. Prompt injection

You don’t need strangers messaging your bot for this to bite. Any web page, email or attachment your agent reads can carry instructions aimed at it, and your agent can’t always tell your instructions from theirs. OpenClaw’s docs put it well: “The content itself is a threat surface, not just the sender.”

Model choice matters here. The docs cite a 2026 test of 272,000 attacks where Claude Opus 4.5 was fooled 0.5% of the time and Gemini 2.5 Pro 8.5% of the time. They also say small models plus web tools is a bad mix.

And no model is a complete fix, so don’t let a good model talk you out of restricting tools.

Risks and fixes at a glance

RiskWhat it looks likeMain fix
Exposed GatewayBound to 0.0.0.0, a LAN address or a forwarded portgateway.bind: "loopback" plus token auth. Use Tailscale Serve for remote access
Malicious skillA skill that asks you to paste a Terminal command, or hides codeRead skills first, run openclaw skills verify, never paste setup commands
Token theftA crafted link to your Control UIVersion 2026.1.29 or later, and keep updating
Prompt injectionInstructions hidden in email or a web pageStrong model, restricted tools, a separate reader agent for untrusted content
Strangers messaging itOpen DMs or groupsdmPolicy: "pairing" or an allowlist, mention-only groups

How to lock down OpenClaw, step by step

  1. Update OpenClaw and Node. The docs recommend Node 24.22.1+ or 26.12.1+ for security, and the audit checks your Node version.
  2. Keep the Gateway local. Set gateway.bind to "loopback" and gateway.auth.mode to "token". Never expose it unauthenticated on 0.0.0.0, and don’t put it on the public internet at all.
  3. Lock down who can talk to it. Use dmPolicy: "pairing" (the default on most channels) or an allowlist. Approve only yourself. Groups should be allowlisted and set to require a mention.
  4. Isolate DMs. Set session.dmScope to "per-channel-peer" so each person gets their own session.
  5. Restrict tools. Keep file access to the workspace with tools.fs.workspaceOnly: true, and leave tools.elevated off unless you know why you need it.
  6. Sandbox anything that touches untrusted input. Sandbox mode "all" with workspaceAccess: "none" or "ro" keeps a reader agent away from your real files.
  7. Turn off LAN discovery you don’t need. Set discovery.mdns.mode to "off" or "minimal".
  8. Run the audit and fix what it finds.

Here’s what that looks like in ~/.openclaw/openclaw.json. It’s a trimmed version of the hardened baseline in the official docs, so check the current page before you copy it.

{
  gateway: {
    mode: "local",
    bind: "loopback",
    port: 18789,
    auth: { mode: "token", token: "use-a-long-random-token" },
  },
  session: { dmScope: "per-channel-peer" },
  tools: {
    profile: "messaging",
    fs: { workspaceOnly: true },
    exec: { security: "deny", ask: "always" },
    elevated: { enabled: false },
  },
  channels: {
    whatsapp: { dmPolicy: "pairing" },
  },
}

That’s a strict setup.

It turns off shell commands entirely, which is the right place to start, and you can open things up one tool at a time as you find you need them.

Run the OpenClaw security audit

openclaw security audit
openclaw security audit --deep
openclaw security audit --fix

The plain audit checks the settings that got people in trouble above, including tool and sandbox settings, network exposure and any flag starting with “dangerous.” --deep adds live Gateway checks.

Know what --fix won’t do. It tightens file permissions and switches open group policies to allowlists. It doesn’t rotate your keys, change your network settings or remove skills.

Those are still on you.

If the audit flags settings like allowUnsafeExternalContent on your Gmail hook or other mappings, turn them back off. The docs say those belong only in short, isolated debugging sessions.

How to vet a skill before you install it

Treat every third-party skill as code you’re about to run, because it is. Skills are folders with a SKILL.md file, so you can read the whole thing before it goes anywhere near your agent.

  • Run openclaw skills verify @owner/<slug>. It fails if ClawHub has marked the skill’s verification as failed.
  • Read SKILL.md and every script in the folder. If it asks you to paste a command into Terminal or download a “helper,” stop there.
  • Install into one workspace first, not with --global, so other agents don’t pick it up.
  • Prefer known publishers, and be extra wary of anything crypto, wallet or “auto-updater” flavored. Those were favorite disguises in ClawHavoc.
  • Lock down write access to your skill folders. OpenClaw reloads a skill when its SKILL.md changes.

Plugins are an even bigger deal. They run inside the Gateway process, so the docs say to treat them as trusted code, use a plugins.allow allowlist and pin exact versions.

Put it on its own machine or account

Running OpenClaw on the same laptop you use for banking is asking for trouble. A dedicated machine, or at least a separate macOS user, limits what a bad skill or a hijacked agent can reach.

That’s why a lot of people use a Mac Mini. I walk through that whole setup in how to set up OpenClaw on a Mac Mini.

On a Mac, grant only the macOS permissions you’ll use. Don’t give Accessibility to node, since any script run through Node could inherit it. And use a separate phone number for WhatsApp or Signal so your personal messages never become agent input.

Whatever machine you pick, back it up before you let an agent loose, and keep an off-site copy too. A backup the agent can reach is a backup the agent can wipe, which is how one startup lost its database and its backups in April 2026.

If you think your OpenClaw was compromised

  1. Stop the Gateway. Quit the app if it runs the Gateway, or kill the openclaw gateway process.
  2. Close the door. Set gateway.bind back to "loopback", turn off Tailscale Funnel or Serve, and set risky DM policies to "disabled".
  3. Rotate everything. That’s the Gateway token or password, remote client secrets, model API keys and every channel login (WhatsApp, Slack, Discord and the rest).
  4. Look at what happened. Run openclaw logs, read the session transcripts under ~/.openclaw/agents/, and check for recent changes to bind, auth, DM policies, tools.elevated and plugins.
  5. Run openclaw security audit --deep and clear every critical finding before you turn it back on.

Did a skill have you paste a Terminal command? Then assume the whole Mac is compromised, not just OpenClaw, and change your passwords from a different device.

FAQ

Is OpenClaw safe to use?

It can be, if you keep it updated, local and locked down. The worst incidents so far came from exposed Gateways, old versions and skills people installed without reading. Bottom line: the defaults are decent, and most of the damage came from people loosening them.

Does VirusTotal scanning make ClawHub skills safe?

No. It catches known malware and some suspicious behavior. It won’t catch a skill that simply tells your agent to do something bad in plain English, and OpenClaw says a clean scan isn’t proof of safety.

Is binding to loopback enough?

It’s the most important setting, but no. CVE-2026-25253 worked on loopback-only installs because the victim’s browser made the connection. You still need updates, token auth and care with links.

Can I safely expose OpenClaw so I can reach it remotely?

Don’t open it to the internet. Use Tailscale Serve, which keeps the Gateway on loopback and lets Tailscale handle access. If you have to bind to your LAN, use auth and firewall the port to a tight list of IP addresses.

Want this done for you?

I run AI agents on my own Mac Mini, and I’m putting together a done-for-you setup for people who’d rather not spend a weekend on it. Join the waitlist and I’ll email you when spots open.

    No spam. One email when spots open.

    Running a business and want AI doing more of your marketing? See AI consulting.

    Brian Meiggs
    Brian Meiggs
    Brian Meiggs is the founder of MeiggsMedia, a digital publishing and performance marketing company. He has spent over a decade helping readers take control of their money, and personally signs up for and cashes out from the apps and financial products his sites cover, then writes up what actually paid. He was named to the Northern Virginia 40 Under 40 in 2026. His work has been featured in the Wall Street Journal, Business Insider, Entrepreneur, and Yahoo Finance.
    Tuesday, November 24, 2026

    SHARE

    Like the article? Share it with friends on your favorite platform.

    MEIGGSMEDIA

    -Advertisement-

    Related

    How to Set Up OpenClaw on a Mac Mini (Safely)

    A step-by-step guide to installing OpenClaw on a Mac Mini as an always-on assistant, with the settings that keep it from becoming someone else's.

    Backblaze Review (2026): Worth It for Your Mac?

    Backblaze is worth it for most Mac owners, as long as you turn on the free one-year version history. Here's what it does well, where it falls short, and how it fits a Mac that runs AI agents.

    Best Cloud Backup for Mac (2026): What I’d Pick for a Mac That Runs AI Agents

    Backblaze is the best cloud backup for most Macs. Here's how it stacks up against IDrive, Arq, Carbonite and iCloud+, and what changes when your Mac runs AI agents.