Black Friday week: local AI hardware on sale. See the list.
← All guides

OpenClaw Security Checklist (2026): The Hardened Config, Line by Line

OpenClaw can run commands, read files and send messages on your behalf. That is the point, and it is also the risk. This checklist uses the settings from OpenClaw's own security docs, checked on 31 October 2026, in the order we would apply them. Steps 1 to 5 take about ten minutes and close the attacks seen in 2026.

Jump to 8 sections
  1. Bottom Line
  2. What Went Wrong in 2026
  3. The Checklist
  4. If You Use a Local Model
  5. If the Agent Is Near Money
  6. Honest Caveats
  7. Sources
  8. See Also

Bottom Line

  • Run openclaw security audit first. It tells you where your setup has drifted from the safe defaults.
  • The defaults are good on a normal install and weak in a container. Host installs bind to loopback. Container images default to an exposed bind.
  • Sandboxing is off until you turn it on. Without it, agent commands run on your real machine.
  • Skills and plugins are code. OpenClaw’s docs: “Plugins run in-process with the Gateway - treat them as trusted code.”
  • Steps 1 to 5 below take about ten minutes. They close the 2026 attacks: the token-theft CVE, malicious skills, and exposed gateways.

What Went Wrong in 2026

IncidentWhat happenedClosed by step
CVE-2026-25253One malicious link could steal the gateway token, even on a loopback-only install. Fixed in 2026.1.291, 3
ClawHavocKoi Security found 341 malicious skills among 2,857 on ClawHub. Most installed the Atomic Stealer malware on macOS6
Exposed gatewaysHunt.io found more than 17,500 OpenClaw gateways reachable from the internet3, 4
Advisories keep comingTwo High advisories on 11 September 2026 covered exec approvals and a WhatsApp login tool1

The Checklist

1. Update, then run the audit

openclaw --version
openclaw security audit

Update past 2026.1.29 at a minimum, and keep updating: the OpenClaw GitHub advisory list is long. openclaw security runs the same audit and applies the supported auto-fixes.

2. Require gateway auth with a long token

openclaw doctor --generate-gateway-token
{ gateway: { auth: { mode: "token", token: "replace-with-long-random-token" } } }

The docs say the gateway refuses WebSocket connections when no valid auth path is configured. For password mode, set it with the OPENCLAW_GATEWAY_PASSWORD environment variable, not in the file.

3. Bind to loopback

{ gateway: { mode: "local", bind: "loopback" } }

Containers are the trap. With bind omitted, auto resolves to 0.0.0.0 inside a detected container. Set loopback on purpose, or put the gateway behind a trusted proxy. For remote access, tailnet is safer than lan.

4. Check what the internet can see

nmap -sT -p 1-65535 <public-ip> --open

Port 18789 (the gateway) must not be in the list. Also set mDNS discovery to minimal on any machine that is not fully private:

{ discovery: { mdns: { mode: "minimal" } } }

5. Turn the sandbox on

{ agents: { defaults: { sandbox: { mode: "all", scope: "agent", workspaceAccess: "none" } } } }
  • scope: agent (default), session for stricter isolation, or shared.
  • workspaceAccess: none (default), ro (read-only), or rw.

Without this, the docs say host=auto resolves to the gateway host.

6. Control what gets installed

{ plugins: { allow: ["@scope/plugin-you-read@1.2.3"] } }
  • Use an explicit plugins.allow list and pin exact versions.
  • Read a skill’s files before you install it. If a skill asks you to paste a command into Terminal, stop. That was the ClawHavoc trick.
  • For a team, set security.installPolicy: a local command that returns allow, warn or block for every skill and plugin install. --force does not override it.

See malicious OpenClaw skills for how the ClawHavoc skills looked.

7. Ask before every command

{
  tools: {
    exec: { security: "deny", ask: "always" },
    elevated: { enabled: false },
    fs: { workspaceOnly: true },
  },
}

tools.elevated runs exec outside the sandbox. Keep it off, or keep tools.elevated.allowFrom to yourself. If you allowlist interpreters, add tools.exec.strictInlineEval: true so python -c style commands still need approval.

8. Deny the dangerous tool groups

This line is from the OpenClaw hardened baseline:

{
  tools: {
    profile: "messaging",
    deny: ["group:automation", "group:runtime", "group:fs", "sessions_spawn", "sessions_send"],
    sessions: { visibility: "agent" },
    agentToAgent: { enabled: false },
  },
}

Agent-to-agent messaging is on by default. Turn it off unless you use it. Check the effect with openclaw policy.

9. Lock down chat channels

{
  session: { dmScope: "per-channel-peer" },
  channels: { whatsapp: { dmPolicy: "pairing", groups: { "*": { requireMention: true } } } },
}

Unknown senders get a pairing code instead of the agent. The docs also suggest a separate phone number for the assistant on WhatsApp, Signal or Telegram.

10. Protect the secrets on disk

chmod 700 ~/.openclaw
chmod 600 ~/.openclaw/openclaw.json
  • Secrets live in openclaw.json, credentials/, state/openclaw.sqlite (MCP OAuth tokens) and each agent’s openclaw-agent.sqlite.
  • Put provider keys in ~/.openclaw/.env or the gateway environment. Workspace .env files cannot set provider keys.
  • Transcripts are not masked. The docs say transcripts, tool arguments and tool results keep their original text, including credentials. Back them up and delete them like secrets.
  • openclaw doctor warns about loose permissions and can tighten them.

11. Keep the dangerous flags off

The OpenClaw network docs list settings that weaken the defaults. None should be on unless you know exactly why:

  • browser.ssrfPolicy.dangerouslyAllowPrivateNetwork
  • hooks.gmail.allowUnsafeExternalContent
  • gateway.controlUi.dangerouslyAllowHostHeaderOriginFallback
  • agents.defaults.sandbox.docker.dangerouslyAllow*
  • any channel dangerouslyAllowNameMatching

12. One gateway per trust level

The OpenClaw trust model is one trust boundary per gateway. If people who do not trust each other use the agent, give them separate gateways, credentials and, ideally, separate OS users or hosts. Tool restrictions do not clean quoted text, forwarded messages or fetched content.

If You Use a Local Model

OpenClaw’s docs say local models do not provide hosted providers’ safety filters. Add the prompt-injection settings in our local LLM prompt injection guide, especially disabling web_fetch, web_search and browser on small models.

If the Agent Is Near Money

Exchange keys and wallets need more than this checklist. Read Binance lost $6.3B through one laptop for the key and approval rules.

Honest Caveats

  1. Config keys change between versions. We checked these against the docs on 31 October 2026. Run openclaw security audit after any change.
  2. exec.security: "deny" blocks shell commands. If your agent needs a shell, keep ask: "always" and use an allowlist.
  3. We have not audited every advisory. The GitHub advisory list for OpenClaw is long. Updating is the only complete fix.

Sources

See Also

Was this guide useful?

Read next

Every OpenClaw CVE in 2026 Explained: 5 Vulnerabilities, 40K Exposed Instances
All five OpenClaw CVEs disclosed in 2026 explained. CVE-2026-25253 enables one-click RCE. 40K exposed instances. Fix commands included.
12% of OpenClaw Skills Were Malicious: How to Vet What You Install
341 malicious skills found on ClawHub. How the ClawHavoc campaign works, what got removed, and how to safely evaluate any OpenClaw skill before installing.
Self-Hosting OpenClaw: The Risks Nobody Talks About
42K+ exposed instances, 9 CVEs in 2026, update failures. Real risks of self-hosting OpenClaw and who should pay someone else to do it.
OpenClaw Enterprise Security: Private Bedrock Access with VPC PrivateLink
How to connect OpenClaw on AWS LightSail to Bedrock without exposing traffic to the internet. VPC PrivateLink, security groups, and private subnet architecture for enterprise AI.