Back to skill

Security audit

Channel Management

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent for channel management, but it gives any direct-message sender administrator-level trust based on an external allowlist assumption and uses broad “execute any request” language.

Review this skill before installing if your OpenClaw deployment allows direct messages from anything other than a tightly controlled admin-only path. It should be safer if administrator identity checks are explicit per channel and “full trust” is scoped to normal authorized operations rather than any request.

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
Findings (1)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:12
Finding

Unconditional Direct-Message Trust Grants Administrative Authority

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 12–20
Vulnerability Type: Unverified identity trust and safety-authority override
Risk Level: High

Vulnerable Code

markdown
### DM (any channel)

All DM senders are **Human Admin** — OpenClaw allowlist guarantees only the admin can DM you.

### Matrix Group Room

Matrix rooms may contain the admin, Workers, trusted contacts, and unknown users. Identify by Matrix user ID:

| Sender | How to identify | Action |
|--------|----------------|--------|
| **Human Admin** | `@${HICLAW_ADMIN_USER}:${HICLAW_MATRIX_DOMAIN}` | Full trust — execute any request |

Technical Analysis

The skill directs the Agent to classify every direct-message sender as the Human Admin without independently verifying a channel-specific, immutable sender identifier. Authentication is delegated entirely to an assumed OpenClaw allowlist.

This is a fail-open authorization design. If the external allowlist is absent, incorrectly configured, bypassed, or affected by an integration routing error, an unauthorized direct-message sender is automatically assigned administrative trust. The instruction to provide “Full trust — execute any request” further expands this authority beyond the legitimate channel-management scope and may override ordinary authorization boundaries or safety checks when the skill is loaded.

Attack Path

  1. An attacker obtains the ability to initiate a direct-message session through an allowlist configuration error, compromised authorized account, channel integration flaw, or message-routing mistake.
  2. The skill applies its unconditional rule that all direct-message senders are Human Admin.
  3. The attacker submits a privileged request, such as changing channel configuration, disclosing operational information, invoking available tools, or performing another management action.
  4. The Agent treats the request as administrativ ...[truncated 1129 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the rule that all direct-message senders are automatically administrators.
  2. Authenticate every sender using a verified, immutable, channel-specific identifier supplied by trusted transport metadata.
  3. Maintain an explicit administrator identity mapping for each supported channel and require an exact match before granting administrative authority.
  4. Fail closed when sender metadata is missing, malformed, ambiguous, or does not match the configured administrator identity.
  5. Do not use mutable destination state such as primary-channel.json as the sole source of authentication truth. Store authorization identities separately with restrictive file permissions and controlled update procedures.
  6. Replace “execute any request” with a narrowly scoped authorization policy. Administrative identity must not disable global safety restrictions, confirmation requirements, or least-privilege controls.
  7. Require explicit confirmation for sensitive or irreversible operations, especially identity changes, trusted-contact enrollment, notification redirection, credential access, and destructive actions.
  8. Add security tests covering unauthorized DMs, missing sender metadata, spoofed identifiers, compromised routing assumptions, and incorrectly configured allowlists.
  9. Log authentication decisions and sensitive configuration changes without recording secrets, allowing administrators to detect unauthorized activity.
Vulnerability Patterns
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The description claims three areas: multiple communication channel management, admin identity recognition, and primary channel configuration. The code only implements the last of these. It reads/writes a single JSON file in the user's home directory containing one confirmed primary channel record, with reset and show operations. There is no logic for recognizing or validating admin identities beyond storing a provided sender_id string, and no functionality for managing multiple channels beyond setting one primary channel. Therefore the declared description materially overstates the implemented behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The file includes natural-language instructions and examples in both English and Chinese, including Chinese-only troubleshooting text at L236 and mixed-language operational guidance at L238-L242. This can create a locale-policy issue because the skill does not clearly state that language should be selected based on user preference for all user-facing or operator-facing interactions, nor justify the locale restriction as region-specific.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.