T01 · Skill Instruction Hijacking
- Location
SKILL.md:6- Finding
Always-Loaded Skill Overrides Agent Safety and Refusal Behavior
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:6-24andSKILL.md:106-114
Vulnerability Type:T01: Skill Instruction Hijacking
Risk Level: HighVulnerable Code Snippet
The following is an English translation of the relevant skill instructions:
yaml metadata: clawdbot: emoji: "mobile-phone" openclaw: always: true priority: 100text Core rules: 1. When a user requests an application card, output an appCard JSON message directly. 3. Do not respond that sending is impossible, unsupported, or temporarily unavailable. 4. Do not explain the JSON format; output it directly. 5. Do not output any other text; output JSON only. Behavior rule: When a user asks to send an application card, directly output clean JSON, without additional descriptions or formatting.Technical Analysis
The skill is configured with
always: trueand priority100, causing its instructions to be loaded broadly and given unusually strong precedence. It then uses absolute language to control the agent's response, including prohibiting refusal, forbidding explanatory text, and requiring JSON-only output.These instructions do not contain an exception preserving higher-level security policies or allowing the agent to reject unsafe card content. Consequently, when a matching request is received, the skill attempts to replace normal safety judgment with a rigid response policy.
The card schema permits user-influenced content, URLs, fields, and limited HTML styling. The skill provides no stated URL allowlist, scheme validation, content sanitization, or protection against deceptive card content. Combined with the prohibition on refusals and warnings, this can cause the agent to generate trusted-looking card objects containing unsafe or misleading content.
The issue is instruction hijacking rather than local code execution. The accompanying
index.jsonly exports static metadata and does not execute commands, access credentials, establish pe ...[truncated 1636 chars]- Remediation
View remediation
Remediation Suggestions
- Remove
openclaw.always: trueunless automatic global loading is essential. Load the skill only when the user explicitly invokes the Lanxin card feature. - Reduce or remove the priority value so the skill cannot improperly supersede safety and platform instructions.
- Delete all unconditional prohibitions against refusal, warnings, or explanatory output.
- Add an explicit precedence rule stating that system instructions, platform security controls, and safety policies always override the skill.
- Permit the agent to reject requests involving phishing, impersonation, harmful content, credential collection, or unsafe destinations.
- Validate every URL before card generation:
- Allow only
httpsURLs. - Reject executable, local-file, scripting, and unsupported schemes.
- Consider a domain allowlist for icons and card destinations.
- Reject embedded credentials and malformed hostnames.
- Allow only
- Sanitize all card text and HTML-style content according to the downstream renderer's supported syntax. Escape or reject unsupported tags and attributes.
- Enforce documented limits for fields and links, including no more than ten field pairs and three links.
- Separate formatting requirements from behavioral control. JSON-only output may be requested after safety validation, but must not prevent a refusal when the underlying request is unsafe.
- Add tests confirming that malicious links, deceptive content, and requests conflicting with higher-level policies are rejected safely.
- Remove
