Back to skill

Security audit

Clash Verge Skill

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly does what it says, but it can change or interrupt the user's proxy service and can send controller credentials to an arbitrary HTTP endpoint if configured that way.

Install only if you intentionally want an agent to administer your local Clash Verge/mihomo controller. Avoid passing secrets on the command line, keep the API endpoint on a local socket or loopback address, and require explicit user confirmation before commands that close connections, switch routing, flush DNS, restart the core, or update Geo data.

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
scripts/clash-verge.py:145
Finding

Controller Credential Exposure Through Command-Line Arguments and Unrestricted Plaintext HTTP

Content
View full analysis
= 400: print(f"API error {resp.status}: {raw.decode(errors='replace')}", file=sys.stderr) sys.exit(1) return json.loads(raw) if raw.strip() else {} else: url = http_url.rstrip("/") + path data = json.dumps(body).encode() if body else None req = urllib.request.Request(url, data=data, headers=headers, method=method) try: with urllib.request.urlopen(req, timeout=10) as resp: raw = resp.read() return json.loads(raw) if raw.strip() else {} ``` The controller URL and secret may also be supplied directly on the command line: ```python p.add_argument("--sock", help=f"Unix socket path (default: {DEFAULT_SOCK})") p.add_argument("--api", help=f"HTTP API URL (default: {DEFAULT_HTTP})") p.add_argument("--secret", help="API secret") ``` ```python # Override env from CLI args import os if args.sock: os.environ["CLASH_SOCK"] = args.sock if args.api: os.environ["CLASH_API"] = args.api if args.secret: os.environ["CLASH_SECRET"] = args.secret ``` ### Technical Analysis The `--secret` option places the mihomo controller credential in th ...[truncated 2780 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill exposes network-control functionality and reads configuration from environment variables, but it declares no explicit tool scope or permission boundaries. In an agent setting, that increases the chance of unintended invocation or overbroad access to local network-control surfaces, including changing proxy behavior and contacting controller endpoints without clear authorization constraints.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger terms are broad enough that ordinary discussion of 'proxy', 'VPN', 'nodes', or network topics could invoke a skill that can actively reconfigure a local proxy controller. Because the skill is operational rather than informational, accidental activation could lead to network changes the user did not intend.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The documented connection-closing commands can terminate one or all active connections, which is a destructive network action, yet the skill text provides no warning or confirmation guidance. In an agent workflow, that omission raises the risk of disruptive or accidental denial of service to the user's own sessions and applications.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Restarting the mihomo core or updating GeoIP/GeoSite databases can alter network routing and availability, but the skill description does not warn that these actions may interrupt connectivity or change filtering behavior. Without guardrails, an agent could perform maintenance actions that unexpectedly disrupt the user's network state.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The cmd_conns_close command performs irreversible DELETE operations, including closing all active connections when --id is omitted. While it prints a message after execution, there is no prior confirmation prompt or explicit warning in comments/docstrings that the command may disrupt active network traffic.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The cmd_restart function triggers a restart of the mihomo core, which can interrupt service, but it does so immediately without confirmation or a warning before execution. The post-action print statement does not disclose the impact in advance.

Content

No source excerpt is available for this finding.