Security Guide

OpenClaw security hardening — the complete checklist

CrowdStrike, Kaspersky, and Cisco have all published warnings about OpenClaw security. This guide covers every hardening step you need, in priority order.

1. Patch CVE-2026-25253 (ClawJacked)

Critical

The ClawJacked vulnerability allowed one-click remote code execution through cross-site WebSocket hijacking. If you installed OpenClaw before February 2026, you are likely affected.

  1. 1Update to OpenClaw v2.4.1 or later: npm update -g openclaw
  2. 2Verify the version: openclaw --version
  3. 3If you cannot update, manually add origin validation to your WebSocket config
  4. 4Check logs for suspicious WebSocket connections from unknown origins

2. Rotate All API Keys and Tokens

High

After ClawJacked and the ClawHavoc supply chain attack (341 malicious skills on ClawHub), any API key that was accessible to OpenClaw should be considered potentially compromised.

  1. 1Rotate your Anthropic/OpenAI/Google API keys in their respective dashboards
  2. 2Regenerate any messaging platform tokens (WhatsApp session, Telegram bot token, Discord bot token)
  3. 3Revoke and recreate any OAuth tokens used by skills
  4. 4Update all new keys in your .env file
  5. 5Check API provider dashboards for unusual usage spikes

3. Audit Your .env File

High

API keys stored in plaintext in .env files are a common attack surface. Ensure your .env is never committed to version control and contains only what is necessary.

  1. 1Confirm .env is listed in .gitignore
  2. 2Remove any unused API keys or tokens from .env
  3. 3Ensure no API keys appear in source code files (search for hardcoded strings)
  4. 4Create a .env.example file with placeholder values for documentation
  5. 5Set restrictive file permissions: chmod 600 .env

4. Lock Down Network Access

High

Over 135,000 OpenClaw instances were found exposed on the public internet. The WebSocket control plane on port 18789 should never be publicly accessible.

  1. 1Configure your firewall to block port 18789 from external access
  2. 2If on a VPS: ufw deny 18789 or equivalent iptables rule
  3. 3Use a reverse proxy (nginx/Caddy) for any web-facing endpoints
  4. 4Enable HTTPS on all external endpoints
  5. 5Bind OpenClaw to localhost (127.0.0.1) if only accessed locally

5. Audit Installed Skills

Medium

The ClawHavoc attack planted 341 malicious skills on ClawHub. An analysis found 26% of community skills contained vulnerabilities. Every installed skill should be reviewed.

  1. 1List all installed skills: openclaw skills list
  2. 2Remove any skills you do not recognize or actively use
  3. 3Check each remaining skill against the ClawHavoc advisory list
  4. 4Review skill source code for suspicious network calls or file access
  5. 5Pin skill versions to prevent automatic updates from introducing vulnerabilities

6. Set Up Monitoring and Logging

Medium

Without monitoring, you will not know if your agent is being exploited. Set up basic logging to detect anomalies.

  1. 1Enable LOG_LEVEL=info in your .env (or debug for troubleshooting)
  2. 2Configure log rotation to prevent disk fill (logrotate or PM2 logs)
  3. 3Monitor API cost dashboards for unexpected usage spikes
  4. 4Set up alerts for failed authentication attempts in your logs
  5. 5Review logs weekly for unusual skill activations or heartbeat patterns

OpenClaw security FAQ

These answers are written for search and AI summary extraction around hardening, exposure, and post-install security review.

Patch known vulnerabilities, rotate credentials, and close any public management ports before you do anything else. Exposure control comes before broader hardening work.

Because agent systems can hold model keys, messaging tokens, skills with broad permissions, and automation hooks that affect real systems. A weak deployment can turn one compromise into a wide blast radius quickly.

Yes. A functioning install is not the same thing as a safe install. Security review should happen after first run and again after adding channels, external skills, or public endpoints.

Need professional hardening?

A full security audit includes everything above plus penetration testing, compliance documentation, and a written remediation report.