Back to skill

Security audit

openclaw-docs-online

Security checks for vulnerabilities and agentic risk

Overview

This documentation skill is mostly coherent, but it includes copy-ready deployment and API examples that could expose an unauthenticated OpenClaw management API.

Review the examples before installing or using this skill for operational guidance. Do not copy the Gateway, Docker, API, or Nginx examples into production as-is; require authentication, bind management APIs to loopback or a private network, use HTTPS, and restrict access with firewall or network controls.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
CLAUDE.md:178
Finding

Unauthenticated Gateway API exposed on all network interfaces

Content
View full analysis

Vulnerability Details

File Locations:

  • CLAUDE.md:178-181
  • EXAMPLES.md:76-79
  • EXAMPLES.md:353-356
  • EXAMPLES.md:398-401
  • EXAMPLES.md:419-426

Vulnerability Type: Insecure network exposure and missing authentication
Risk Level: Medium

Vulnerable Code

CLAUDE.md:178-181 and EXAMPLES.md:76-79 recommend binding the Gateway to every available network interface:

yaml
server:
  host: 0.0.0.0
  port: 18789

EXAMPLES.md:353-356 states that the API has no authentication by default:

markdown
## ⚠️ Notes
- The API has no authentication by default; authentication is recommended for production
- All endpoints return JSON
- Error responses contain detailed error information
- HTTPS deployment is recommended

EXAMPLES.md:398-401 publishes the Gateway port on the Docker host:

yaml
ports:
  - "18789:18789"

EXAMPLES.md:419-426 provides a plaintext HTTP reverse-proxy configuration:

nginx
server {
    listen 80;
    server_name your-domain.com;

    location / {
        proxy_pass http://localhost:18789;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}

Technical Analysis

Binding the Gateway to 0.0.0.0 makes it listen on all host interfaces rather than limiting access to the loopback interface. The Docker mapping "18789:18789" similarly publishes the service on the host's available interfaces unless a more restrictive address is specified.

These settings are particularly risky because the documentation explicitly says that the API has no authentication by default. The same examples describe message, session, and Skill-management endpoints. If those endpoints are implemented and deployed as documented, any network client able to reach port 18789 may be able to invoke them without proving its identity.

The reverse-proxy example listens on plaintext HTTP and does not c ...[truncated 2120 chars]

Remediation
View remediation

Remediation Suggestions

  1. Use a loopback binding by default

    Replace the all-interface binding with:

    yaml
    server:
      host: 127.0.0.1
      port: 18789
    

    Only permit a non-loopback binding when the administrator explicitly configures authentication and network restrictions.

  2. Restrict Docker port publication

    Bind the published port to loopback:

    yaml
    ports:
      - "127.0.0.1:18789:18789"
    

    Alternatively, avoid publishing the port and place the Gateway and reverse proxy on a private Docker network.

  3. Require authentication

    Include a complete authentication configuration in every runnable API and production-deployment example. The service should fail closed when started on a non-loopback interface without authentication.

    Use securely generated credentials or tokens supplied through a protected secret manager or environment file. Do not embed real credentials in Markdown, images, or source-controlled Compose files.

  4. Provide an HTTPS production configuration

    Configure TLS on the reverse proxy and redirect plaintext HTTP to HTTPS. Restrict the upstream Gateway to loopback or a private container network. Use modern TLS settings and protect authentication tokens from transmission over plaintext connections.

  5. Apply network access controls

    Limit access with host firewalls, cloud security groups, private networks, VPNs, or explicit IP allowlists. Port 18789 should not be directly exposed to the public Internet.

  6. Apply endpoint authorization

    Separate read-only, messaging, session-management, and Skill-management privileges. Administrative endpoints should require stronger authorization than ordinary message submission.

  7. Reduce information disclosure

    Return generic errors to remote clients and retain detailed diagnostics only in access-controlled server logs.

  8. Correct all reusable examples

    Updat ...[truncated 217 chars]

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The entire skill is written as an authoritative instruction set in Chinese and requires the agent to follow that format strictly, but it does not state that Chinese is optional or limited to a China-specific audience. This can violate language/locale policy because it implicitly constrains outputs to a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file presents all user inputs, expected outputs, and instructions in Chinese only. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is explicitly justified, which is not provided here.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · EXAMPLES.md (reported line 141)May include surrounding context.

1. 创建技能目录

bash
mkdir -p ~/.openclaw/skills/my-skill
cd ~/.openclaw/skills/my-skill

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · EXAMPLES.md (reported line 141)May include surrounding context.

1. 创建技能目录

bash
mkdir -p ~/.openclaw/skills/my-skill
cd ~/.openclaw/skills/my-skill

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · EXAMPLES.md (reported line 225)May include surrounding context.

ls ~/.openclaw/skills/my-skill/

必需文件

ls ~/.openclaw/skills/my-skill/SKILL.md ls ~/.openclaw/skills/my-skill/CLAUDE.md

text

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · EXAMPLES.md (reported line 335)May include surrounding context.

发送消息

bash
curl -X POST http://localhost:18789/api/message/send \
  -H "Content-Type: application/json" \
  -d '{
    "channel": "wechat",

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger condition '用户询问 OpenClaw 功能、配置、使用方法时触发' is broad enough to overlap with many normal conversations about OpenClaw, which can cause the skill to activate outside clearly bounded documentation-query scenarios. In an agent setting, overly broad activation increases the chance of unintended tool use, unnecessary network access, and instruction precedence conflicts with other skills or system behavior.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.