T01 · Skill Instruction Hijacking
- Location
SKILL.md:87- Finding
Untrusted Memory Files Can Hijack Agent Identity and Behavior
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 87-96
Vulnerability Type:T01: Skill Instruction Hijacking
Risk Level: HighRelevant snippet (faithful English translation of the source):
markdown The AI will automatically: 1. Read your memory/ folder 2. Load the core concepts 3. Learn your previous insights 4. Inherit your methodology Afterward, the AI will communicate with you as your "digital clone": - Remember who you are - Think in your way - Solve problems using your methodologyTechnical Analysis
The Skill directs the Agent to load Markdown files as authoritative identity, personality, principles, and methodology. It does not establish a trust boundary between factual memory data and executable behavioral instructions.
Because the loaded files can define how the Agent should think and act, an attacker who can modify a memory file can insert prompt-injection content that changes the Agent's current goals, suppresses safeguards, redirects tool calls, or causes unrelated tasks to be performed. The Skill provides no instruction filtering, provenance validation, content isolation, or requirement for user confirmation before applying behavioral directives.
Attack Path
- An attacker gains the ability to create or modify a Markdown file in the configured
memory/directory. - The attacker inserts instructions that impersonate identity or methodology content, such as directions to ignore previous constraints or perform unrelated tool actions.
- The user invokes the Skill using its trigger phrase.
- The Agent reads the attacker-controlled file and treats its contents as identity or behavioral guidance.
- The injected directions influence the current session and may redirect later Agent decisions or tool use.
Impact Assessment
Successful exploitation can alter the Agent's current-session identity, priorities, response style, safety posture, and task exec ...[truncated 419 chars]
- An attacker gains the ability to create or modify a Markdown file in the configured
- Remediation
View remediation
Remediation Suggestions
- Treat every memory file as untrusted data rather than as executable Agent instructions.
- Separate factual memories, user preferences, and behavioral configuration into distinct schemas.
- Explicitly prohibit memory content from overriding system instructions, safety policies, tool restrictions, or the user's current request.
- Parse memory through a constrained data format with an allowlist of supported fields instead of loading arbitrary Markdown directly into the instruction context.
- Detect and quarantine prompt-like directives, role reassignment, tool commands, encoded content, and requests to ignore higher-priority instructions.
- Display a preview and require explicit user approval before applying identity, personality, or methodology changes.
- Record file provenance and integrity metadata so unexpected modifications can be identified.
- Apply least privilege when processing memory and do not make tools available solely because a memory file requests them.
