At the start of 2026, an open-source AI agent named OpenClaw (nicknamed “Lobster”) swept through the global developer community, becoming one of the fastest-growing projects on the GitHub platform. It integrates multi-channel communication capabilities with large language models, enabling autonomous access to local files, browsers, emails, and even system commands, significantly boosting work efficiency. However, accompanying this “lobster farming” craze is a series of alarming security vulnerabilities—from authentication bypass to remote code execution, from sandbox escapes to plaintext API key leaks. The National Vulnerability Database (NVDB) has already cataloged several of its high-risk vulnerabilities, and the GitHub Advisory Database disclosed dozens of related security issues in March 2026 alone.
Faced with this trade-off between efficiency and security, we must neither abandon the powerful capabilities of AI agents out of fear nor disregard risks and deploy them blindly. This article systematically outlines the core security risks of OpenClaw, provides actionable mitigation strategies, and explores how to leverage professional security tools to build a defense-in-depth system.
I. Comprehensive Overview of Core Security Risks
1.1 High-Risk Vulnerabilities: Attackers Can Easily “Take Over” Your System
Among the recently disclosed OpenClaw vulnerabilities, several high-risk ones with CVSS scores as high as 8.8 are particularly concerning. These vulnerabilities share a common characteristic—attackers can exploit them directly without complex prerequisites, and some have even been observed in active exploitation in the wild.
- CVE-2026-25253 (CVSS 8.8): The OpenClaw Control UI has a parameter handling flaw, accepting the
gatewayUrlparameter in the query string. An attacker can craft a phishing link that, when clicked by a user, transmits the authentication token to a malicious server, enabling unauthorized remote code execution. This means a user merely opening a malicious link in their browser could grant the attacker full system control. - CVE-2026-25157 (CVSS 8.1): A specific API endpoint contains a command injection vulnerability. Attackers can directly send requests containing malicious commands to this endpoint, which are parsed and executed without strict filtering. This allows arbitrary system commands to be executed on the host machine without authentication, enabling file reading/writing, deletion, and even device control.
- GHSA-6mgf-v5j7-45cr (CVSS 7.5): The
fetch-guardcomponent has a logic flaw. During cross-origin redirects, it forwards the authorization request header directly to the redirect target. Attackers can construct malicious redirect links to steal user authorization credentials, subsequently achieving unauthorized API calls.
1.2 Default Configuration Flaws: The Greatest Risk Often Comes from Being "Plug-and-Play"
Worryingly, OpenClaw’s default configuration itself plants seeds of security risk:
- Default No Authentication: The out-of-the-box configuration does not enable any authentication. Instances exposed on the network can be remotely accessed by anyone, allowing them to execute commands, read files, and steal credentials.
- Plaintext API Key Storage: OpenClaw stores API keys for AI services and cloud services in plaintext within local configuration files by default. If an instance is compromised, attackers can directly obtain these service keys, leading to financial loss.
- Blurred Trust Boundary: OpenClaw mistakenly treats all connections from
localhostas trusted sources without additional authentication. Attackers can exploit this by initiating local WebSocket connections via malicious JavaScript in a browser, bypassing authentication mechanisms.
1.3 Supply Chain Risks: The “Poisoned Bait” of the ClawHub Skill Marketplace
OpenClaw’s third-party skill marketplace, ClawHub, has emerged as another major risk source. Security audits reveal that approximately 36.82% of ClawHub skills contain exploitable security flaws. More alarmingly, 341 malicious skill packages were found to contain malware such as keyloggers and credential stealers. Under default configurations, the AI might even automatically install skills without user confirmation—effectively opening a backdoor for attackers.
1.4 Differentiated Risks Across Four Application Scenarios
The National Vulnerability Database (NVDB) categorizes typical OpenClaw application scenarios into four types, each with distinct risk profiles:
| Application Scenario | Primary Risks | Typical Cases |
|---|---|---|
| Intelligent Office | Supply chain attacks, intranet lateral movement, sensitive information leakage | After integrating with enterprise management systems, a malicious plugin leads to database leaks. |
| Development & Ops | Unauthorized system command execution, device hijacking, API credential leakage | While assisting with code runtime, malicious commands are injected, leading to server compromise. |
| Personal Assistant | Personal information theft, prompt injection attacks, plaintext key leakage | Remote access is hijacked, leading to malicious reading/writing of personal files. |
| Financial Trading | Memory poisoning causing erroneous trades, unauthorized account takeover | A quantitative trading system is injected with incorrect strategies, leading to uncontrolled frequent orders. |
II. Systematic Protection Strategy: Building an OpenClaw Security Defense Line
Faced with these complex risks, effective protection cannot rely on isolated measures but must build a full lifecycle security system covering deployment, configuration, operation, and incident response.
2.1 Deployment Phase: Eliminate Exposure Risks at the Source
Strictly controlling internet exposure is the primary principle. OpenClaw's gateway port (default 18789) must not be directly exposed to the public internet. If remote access is necessary, use encrypted channels like SSH and restrict access source addresses. You can check for exposure using the following commands:
# Linux users:
ss -tlnp | grep 18789
# If it shows 0.0.0.0:18789, it is exposed on all network interfaces.
Configure OpenClaw to listen only on the local address in openclaw.json:
{
"gateway": {
"mode": "local",
"port": 18789,
"bind": "loopback"
}
}
Use the official latest version and avoid third-party images or outdated versions. Back up data before upgrading, restart the service after upgrading, and verify that the patches have taken effect.
2.2 Configuration Phase: Implement Least Privilege and Mandatory Authentication
Enabling mandatory authentication is crucial to block unauthorized access. Be sure to add an authentication token to the configuration:
{
"gateway": {
"auth": {
"token": "Use at least a 32-character random string"
}
}
}
Follow the principle of least privilege by running OpenClaw with a dedicated, low-privilege system account and never run it as root or administrator. Isolate it within a container or virtual machine to create an independent privilege domain.
Encrypt sensitive credentials to avoid storing API keys in plaintext in configuration files. Apply strong encryption to authentication materials stored in localStorage and implement an expiration mechanism.
2.3 Operation Phase: Establish Real-Time Monitoring and Blocking Capabilities
Use the skill marketplace with caution and be prudent when downloading ClawHub “skill packages.” Review the skill package code before installation and avoid using skills that require actions like “download ZIP,” “execute shell script,” or “enter password.”
Guard against social engineering attacks by enabling browser sandboxes, web filters, and other extensions to block suspicious scripts. Enable logging and audit functions; if suspicious behavior is detected, immediately disconnect the gateway and reset passwords.
Establish a high-risk command blacklist and require secondary confirmation or manual approval for critical operations such as deleting files, sending data, or modifying system configurations.
2.4 Incident Response Phase: Establish a Rapid Response Mechanism
Regularly check and patch vulnerabilities, staying updated on risk alerts from sources like the official OpenClaw security announcements and the NVDB platform. If an instance is suspected of being compromised, immediately stop the service and replace all relevant API keys and passwords.
III. Defense in Depth: A Complete Loop from Document Security to System Hardening
In the era of widespread AI agent adoption, security protection should not be limited to OpenClaw itself but should extend to its entire interaction chain. When processing important documents, choosing secure skills is critical.
ComPDF Skills As a professional PDF document security solution, ComPDF offers a comprehensive set of document processing capabilities that are both powerful and secure:
- High-Fidelity Conversion: Convert PDF/image files to formats like Word, Excel, PPT, HTML, CSV, JSON, RTF, TXT, images, and Markdown while preserving original layouts and styles.
- Advanced Page Operations: Extract, rotate, and merge pages—providing agents with precise, physical-level page control. Supports complete PDF page operations such as merging, splitting, extracting, deleting, adding, and rotating.
- Intelligent OCR Recognition: Recognizes scanned documents and handwritten content while maintaining the original layout, ensuring the structure of converted documents remains intact.
- Document Security & Optimization: Intelligent document compression (pre-processing to reduce token consumption) and watermarking (copyright protection) balance efficiency and security.
- Document Comparison: Quickly compare two documents and provide a navigable list of differences, improving review efficiency. Supports both content comparison and overlay comparison modes.
Integrating ComPDF into OpenClaw’s workflow achieves dual protection: “system-level security + secure document processing.”
IV. Conclusion: Finding the Balance Between Efficiency and Security
As a representative AI agent, OpenClaw’s powerful automation capabilities are reshaping the way we work. However, as emphasized by the “Six Dos and Don'ts” recommendations from the Ministry of Industry and Information Technology (MIIT), improvements in efficiency must never come at the cost of security. From the timely patching of high-risk vulnerabilities, to the strict implementation of least privilege principles, to the addition of document-level encryption protection, only by building a systematic security defense can we navigate this “lobster farming” trend steadily and safely.
For both enterprises and individual users, security is not a constraint but the foundation for more efficiently and sustainably enjoying the dividends of technology. Before deploying OpenClaw, consider asking yourself one question: If my AI agent were taken over tomorrow, would my data be safe?
Top comments (0)