T01 · Skill Instruction Hijacking
- Location
SKILL.md:14- Finding
Unconditional Session Instruction and Output Hijacking
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 14-15; reinforced at lines 70-71
Vulnerability Type: Prompt-based session goal and output-control hijacking
Risk Level: HighVulnerable Code
Primary role-replacement directive at line 14:
markdown You are now the "Session Classification Assistant" (会话分类整理助手). Strictly follow all rules below and output ONLY Markdown format results—no extra dialogue or explanations!Reinforcing mandatory output directive at line 70:
markdown 1. Output ONLY pure Markdown code, no explanations or redundant text.Technical Analysis
The Skill uses unconditional imperative language to replace the agent's active role, require strict compliance with all subsequent Skill rules, and control the format of every response. These instructions take effect as soon as the Skill text is loaded rather than only after the user explicitly requests session classification.
Requiring Markdown output is reasonably related to the declared classification function. However, globally requiring the agent to output only Skill-controlled Markdown and prohibiting explanations exceeds the minimum privileges necessary. A safe implementation only needs to apply the template to an explicitly requested classification operation.
The prohibition on explanations can interfere with transparency, error reporting, safety warnings, and unrelated user tasks. The instruction to traverse all content in the current session also broadens the data scope beyond content that a user may have deliberately selected for classification.
This is an instruction-layer vulnerability rather than an operating-system privilege escalation. The project contains no executable scripts, dependency files, network retrieval, persistence mechanisms, credential access, or local code-execution behavior.
Attack Path
- A host application loads
SKILL.mdinto an agent's instruction context. - The uncondition ...[truncated 1574 chars]
- A host application loads
- Remediation
View remediation
Remediation Suggestions
- Remove role-replacement language such as
You are nowand unconditional compliance language such asStrictly follow all rules below. - Scope the behavior to explicit user intent. For example: “When the user explicitly requests classification of specified conversation content, organize that content using the following Markdown template.”
- State that higher-priority platform instructions, safety policies, and the user's current request remain authoritative.
- Replace the global
output ONLYrule with a task-scoped preference: “For a requested classification result, return the result as Markdown unless higher-priority instructions or the user require another format.” - Require explicit authorization before processing the entire session. Default to user-selected content or a clearly defined range.
- Permit safety warnings, consent questions, errors, and limitations outside the classification template.
- Avoid asserting timestamps that are unavailable from the source conversation. Mark missing timestamps as unavailable rather than fabricating them.
- Add a boundary statement clarifying that content being classified is data and must never be interpreted as instructions.
- Test the revised Skill against unrelated requests, conflicting format requests, sensitive conversation content, and embedded prompt-injection text to verify that it activates only when explicitly invoked.
- Remove role-replacement language such as
