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
Bottom Line
- Run
openclaw security auditfirst. 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
| Incident | What happened | Closed by step |
|---|---|---|
| CVE-2026-25253 | One malicious link could steal the gateway token, even on a loopback-only install. Fixed in 2026.1.29 | 1, 3 |
| ClawHavoc | Koi Security found 341 malicious skills among 2,857 on ClawHub. Most installed the Atomic Stealer malware on macOS | 6 |
| Exposed gateways | Hunt.io found more than 17,500 OpenClaw gateways reachable from the internet | 3, 4 |
| Advisories keep coming | Two High advisories on 11 September 2026 covered exec approvals and a WhatsApp login tool | 1 |
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),sessionfor stricter isolation, orshared.workspaceAccess:none(default),ro(read-only), orrw.
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.allowlist 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.--forcedoes 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’sopenclaw-agent.sqlite. - Put provider keys in
~/.openclaw/.envor the gateway environment. Workspace.envfiles 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 doctorwarns 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.dangerouslyAllowPrivateNetworkhooks.gmail.allowUnsafeExternalContentgateway.controlUi.dangerouslyAllowHostHeaderOriginFallbackagents.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
- Config keys change between versions. We checked these against the docs on 31 October 2026. Run
openclaw security auditafter any change. exec.security: "deny"blocks shell commands. If your agent needs a shell, keepask: "always"and use an allowlist.- We have not audited every advisory. The GitHub advisory list for OpenClaw is long. Updating is the only complete fix.
Sources
- OpenClaw: security overview: defaults,
openclaw security audit,openclaw policy, trust model - OpenClaw: hardened baseline: gateway, tools and channel settings
- OpenClaw: network exposure: port, bind values, auth modes, nmap check, mDNS, dangerous flags
- OpenClaw: tool permissions: sandbox, elevated, plugins, installPolicy
- OpenClaw: secrets and storage: secret files, permissions, unmasked transcripts
- OpenClaw: prompt injection: sandbox opt-in, agentToAgent, strictInlineEval
- OpenClaw GitHub security advisories
- The Hacker News: CVE-2026-25253
- The Hacker News: 341 malicious ClawHub skills
- Hunt.io: exposed OpenClaw gateways