Security Overview
OpenClaw gives an AI agent real access to your machine and your accounts. This page covers what is safe by default, what isn't, and a baseline config to start from; Security Hardening has the full checklist. Checked against v2026.10.4 on 2026-10-18.
Start here
1. Run the latest stable release
openclaw --version
openclaw update
openclaw plugins update --all
openclaw update works for npm, pnpm and git installs (openclaw update). Channel plugins ship some security fixes separately, so update them too. See Known Vulnerabilities for why this matters.
2. Start from a hardened baseline
This is upstream's "hardened baseline in 60 seconds", with the current tools.exec.mode key. It keeps the Gateway local, isolates DMs per sender, and turns off shell, file and automation tools. Re-enable tools per trusted agent from there.
{
gateway: {
mode: "local",
bind: "loopback",
auth: { mode: "token", token: "${OPENCLAW_GATEWAY_TOKEN}" },
},
session: { dmScope: "per-channel-peer" },
tools: {
profile: "messaging",
deny: ["group:automation", "group:runtime", "group:fs", "sessions_spawn", "sessions_send"],
fs: { workspaceOnly: true },
exec: { mode: "deny" },
elevated: { enabled: false },
sessions: { visibility: "agent" },
agentToAgent: { enabled: false },
},
channels: {
telegram: { dmPolicy: "pairing", groups: { "*": { requireMention: true } } },
},
}
Set OPENCLAW_GATEWAY_TOKEN to the output of openssl rand -hex 32, or run openclaw doctor --generate-gateway-token to write a token into the config. The Gateway rejects blank and placeholder tokens at startup (network exposure).
OpenClaw refuses to start on unknown config keys. Snippets that use gateway.host, channels.*.allowed_chat_ids or hands.* are invalid. Run openclaw config validate after every edit.
3. Run the audit
openclaw security audit --deep
openclaw security audit --fix # tightens group policies and file permissions only
The audit tells you when you have drifted from safe defaults. It is not a substitute for tool policy and sandboxing, which upstream treats as the real boundaries (SECURITY.md, openclaw security).
What is on by default
As of v2026.10.4:
| Setting | Default | Source |
|---|---|---|
| Gateway bind | loopback on host installs | network exposure |
| Gateway bind in the Docker setup | lan, port published on all host interfaces | Docker networking |
| Gateway auth | Required; fails closed with no secret | network exposure |
| DM policy | pairing (unknown senders get a code) | access control |
| Group policy | allowlist | groups |
Host shell (tools.exec.mode) | full: commands run without asking | exec approvals |
Sandbox (agents.defaults.sandbox.mode) | off | sandboxing |
| Session tool reach | Gateway-wide (tools.sessions.visibility: "all") | trust model |
| Update check | A daily request to telemetry.openclaw.ai | telemetry |
The bold rows are the ones to change for most setups: publish Docker ports to loopback, turn on exec approvals and enable the sandbox.
What OpenClaw has access to
With the defaults, the agent can:
- Run shell commands on the Gateway host as your user, without approval
- Read and write files your user can access (file tools can be limited to the workspace; exec can't without a sandbox)
- Drive a browser, fill forms and fetch URLs
- Send messages on your behalf through connected channels, including across channels
- Make HTTP requests
- Edit its own workspace files, including
SOUL.md,AGENTS.mdandMEMORY.md
Source: SECURITY.md, which says exec is host-first by default and recommends sandbox mode plus strict tool policy when you need isolation.
Trust model
OpenClaw is built as a personal assistant for one trusted operator, possibly with many agents. It is not a multi-tenant system (trust model):
- One trust boundary per Gateway. A single operator, or a team whose members trust each other. For people who don't trust each other, run separate Gateways, ideally under separate OS users or hosts.
- Everyone who can message an agent shares its tools. In a shared Slack workspace, any allowed sender can steer the agent within its permissions.
- Session ownership and operator roles are guardrails, not isolation.
- Anyone who can edit
~/.openclawis an operator. - The model is not trusted. Assume prompt injection can manipulate it. A prompt injection on its own is out of scope as a vulnerability report; a report must show a bypass of auth, tool policy, approvals or the sandbox (SECURITY.md).
- Plugins are trusted code. They run in-process with the Gateway's privileges.
Threat model
| Surface | Risk | Mitigation |
|---|---|---|
| Gateway port | Full operator access if reached with a valid secret, or with none | Loopback bind, strong token, SSH tunnel or Tailscale Serve for remote access |
| Docker publishing | Port exposed on every host interface; bypasses ufw | Publish to 127.0.0.1:18789, DOCKER-USER rules |
| Reverse proxies | Forwarded-header spoofing | gateway.trustedProxies, overwrite X-Forwarded-For. An unconfigured same-host proxy is rejected with 403 proxy_attribution_required (since PR #1795, January 2026) |
| Channel messages | Prompt injection from senders | DM pairing or allowlists, mention-gated groups, contextVisibility |
| Host shell | Injected commands run as your user | tools.exec.mode: "ask" or "deny", sandbox |
| ClawHub skills | Malicious instructions or code | openclaw skills verify, manual review, security.installPolicy |
| Plugins | Arbitrary code in the Gateway process | Install only what you trust, plugins.allow |
| Credentials | Plaintext in openclaw.json, .env, credentials/ | SecretRefs, openclaw secrets audit --check, 600/700 permissions |
| Transcripts and memory | Private data at rest, including secrets that tools read (unmasked from 2026.10.10; see below) | Full-disk encryption, tight permissions, pruning |
| Browser automation | SSRF into your LAN, session theft | Strict-by-default browser.ssrfPolicy (allowedHostnames, blockedHostnames) |
| LLM provider | Your prompts and tool output leave the host | Choose a provider and retention terms you accept, or a local model |
Details: Security Hardening, upstream Security.
2026.10.10-beta.1 (npm beta, 2026-10-15; not in 2026.10.4) stops masking secrets in tool arguments, tool results and .env reads before they reach the model, transcripts and the UI. Logs, support exports and telemetry stay masked. On 2026.10.4 masking is still on. Plan for it now by keeping secrets in SecretRefs, not in files the agent reads; see hardening and PR #169063.
The Prompt Injection Problem
OpenClaw processes untrusted content (chat messages, web pages, documents, skill text) in the same model context as your instructions. Upstream wraps external content and offers controls such as contextVisibility, but the model can still be manipulated. Limit what a manipulated agent can do (prompt injection).
In February 2026, Zenity Labs demonstrated a zero-click attack chain against a default setup:
- Indirect prompt injection through a Google Document
- The agent creates a Telegram integration with an attacker-controlled bot
- The attacker edits
SOUL.mdfor persistence across sessions - A scheduled task re-injects instructions every 2 minutes
- A traditional C2 implant completes the compromise
Every step used intended capabilities. The defences that would have stopped it are the ones that limit capability: exec approvals or exec.mode: "deny", the sandbox, a messaging tool profile for agents that read documents, and allowlisted channels.
Checklist
The canonical checklist, with a config and a reason for every item, is Security Hardening. For a twelve-line version to tick off before connecting a channel, see Choosing Your Setup.
Community security tools
Third-party scanners and monitors are listed, unreviewed, on Ecosystem and in Skill Verification. A security tool runs with the same access as the agent, so vet it like any other skill or plugin.
For compliance questions (GDPR, SOC 2, HIPAA, analyst assessments), see Privacy & Compliance.
Security incident history
OpenClaw's adoption (392,000+ GitHub stars as of 2026-10-18) outpaced its security work in early 2026. In late January and early February 2026, a one-click RCE (CVE-2026-25253) was patched, tens of thousands of exposed instances were found on the internet, hundreds of malicious skills were found on ClawHub, and the Moltbook breach exposed 1.5 million agent API tokens.
Since then the project has published 722 security advisories (as of 2026-10-18), 14 of them critical. The full timeline, the critical advisories and the current minimum version are on Known Vulnerabilities.
Deep dives
- Security Hardening: the full self-hosting checklist
- Known Vulnerabilities: advisories, incidents and timeline
- Skill Verification: reviewing skills before installing them
- Privacy & Compliance: data flows, telemetry, GDPR, SOC 2, HIPAA
- Upstream: Security · Trust model · Threat model (MITRE ATLAS)