Back to skill

Security audit

Claw Switch

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to be a legitimate OpenClaw model switcher, but its always-on natural-language routing can change the active model and restart the gateway on overly broad prompts.

Review this before installing if you do not want a skill that can automatically change your OpenClaw model and restart the gateway based on broad natural-language task descriptions. It looks purpose-built rather than malicious, but it should ideally require explicit switch commands or confirmation before mutating model configuration.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Natural-Language Policy Violations

Medium
Confidence
81% confidence
Finding
The user-facing instructions and examples are presented exclusively in Chinese, which can amount to forcing a specific language without user opt-in. The README does not offer an alternative language, language selection, or a justification that the skill is intended only for a Chinese-language audience.

Session Persistence

Medium
Category
Rogue Agent
Content
### 方法 1:手动安装
```bash
# 1. 复制 skill 文件到 OpenClaw skills 目录
mkdir -p ~/.openclaw/skills/clawswitch
cp -r clawswitch-v2.1/* ~/.openclaw/skills/clawswitch/

# 2. 重启 gateway
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.

Vague Triggers

Medium
Confidence
89% confidence
Finding
The README says model switching can happen '通过自然语言' and gives very generic example phrases like '写一段代码' and '分析这个文档'. These overlap with common everyday requests and the document does not define clear boundaries, exact trigger phrases, or exclusion conditions for when routing should or should not activate.

Vague Triggers

Medium
Confidence
93% confidence
Finding
The skill description says users can 'just use natural language,' which gives the activation scope very weak boundaries for a user-invocable skill. In practice, this can cause the agent to invoke the router on vague or unrelated requests, leading to unintended execution of model-switching commands and service restarts.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The rule routing 'other any task' to OpenRouter Auto makes the skill effectively applicable to nearly all user requests, not just model-selection tasks. That overbroad scope increases the chance of accidental invocation and unauthorized environment changes, including changing the configured model and restarting the gateway when the user did not clearly request administrative actions.

Natural-Language Policy Violations

Medium
Confidence
87% confidence
Finding
The model selection metadata includes explicit Chinese-language keywords such as "图片", "文件", and "识图", and similar Chinese-only keyword sets recur elsewhere in the catalog. This creates a natural-language locale preference in routing behavior, but the file does not state that users can choose language behavior or that the Chinese bias is limited to a justified region-specific deployment.

Static analysis

No suspicious patterns detected.