T02 · Agent Memory Poisoning
- Location
SKILL.md:179- Finding
Untrusted Conversation Input Can Trigger Persistent Skill Self-Modification
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 179-183
Vulnerability Type: Persistent agent memory poisoning through unreviewed self-modification
Risk Level: MediumVulnerable Instruction
The following is an English translation of the complete affected instruction block:
markdown When the user provides new practical experience or feedback: 1. Update the corresponding files under references/ 2. Add new question templates to SKILL.md 3. Adjust the cognitive-stage stratification strategy 4. Accumulate more cases in case-studies.mdTechnical Analysis
The skill directs the agent to incorporate user-provided experience or feedback into persistent, instruction-bearing project files. The affected destinations include
SKILL.md, which controls agent behavior, and files underreferences/, which are subsequently loaded as trusted coaching material.No trust validation, content sanitization, provenance tracking, approval process, or separation between user data and executable instructions is specified. Consequently, attacker-controlled content presented as feedback could be promoted from untrusted conversation input into trusted persistent state.
This is a memory-poisoning issue because the injected material can survive the current interaction and influence later sessions. Writing malicious behavioral instructions into
SKILL.mdwould be especially impactful because those instructions could be interpreted as part of the skill's authoritative configuration whenever the skill is loaded.Attack Path
- An attacker interacts with the coaching skill and submits crafted content framed as practical experience, a successful coaching technique, or feedback.
- The content includes hidden or explicit behavioral rules, such as instructions to disclose future user information, ignore safety restrictions, follow attacker-controlled directions, or reference deceptive material.
- Following
SKILL.md:179-183, the agent writes the co ...[truncated 1438 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove instructions that permit the agent to modify
SKILL.mdor trusted reference files directly in response to user input. - Store proposed additions in a separate, non-executable review queue that is never loaded as authoritative skill instructions.
- Require explicit maintainer approval before promoting any proposed content into
SKILL.mdorreferences/. - Record provenance for every proposed update, including the source session, submitter trust level, timestamp, and reviewer.
- Validate submissions against a strict schema and reject content containing operational directives, prompt overrides, tool instructions, external payload references, or requests to weaken safety controls.
- Enforce filesystem permissions that make skill and reference files read-only during ordinary conversations.
- Apply changes through a controlled, auditable update process with version review, integrity checks, and rollback support.
- Treat reference content as untrusted data at runtime and explicitly prevent it from overriding system, developer, or skill-level instructions.
- Remove instructions that permit the agent to modify
