T02 · Agent Memory Poisoning
- Location
SKILL.md:29- Finding
Uncontrolled Persistent Modification of Agent Memory and Behavioral State
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:29-30, 116-124;skills/agent-training/SKILL.md:21-27, 31-44, 66-68;references/training-manual-template.md:87, 96-98, 159-164;skills/agent-training/references/training-manual-template.md:87, 96-98, 159-164
Vulnerability Type: Persistent memory poisoning through unvalidated conversational input
Risk Level: MediumRelevant excerpts, translated into English from the source:
markdown ### Record before responding (WAL protocol) - When receiving a correction ("it is X, not Y"), write it to a file before responding.markdown - Regularly review learnings and promote high-value content into SOUL.md, TOOLS.md, and USER.md.markdown - [ ] Training content has been confirmed in MEMORY.md.markdown 3. Record experience — write important findings into MEMORY.md.Technical Analysis
The Skill instructs Agents to persist conversational corrections, decisions, training acknowledgements, and other findings in long-term files. It also directs Agents to promote selected records into
SOUL.md,TOOLS.md, andUSER.md, which can affect personality, tool use, user assumptions, and behavior in later sessions.Conversational content is not necessarily trusted. A malicious participant, compromised external source, or ordinary factual error could be presented as a correction or important finding. The instructions do not require provenance tracking, content validation, explicit user approval, separation of facts from executable instructions, expiration, or rollback before the content becomes persistent state.
The issue is compounded by the instruction to write before replying. This can cause persistence before the user has an opportunity to review or reject what will be stored.
Attack Path
- An attacker or untrusted source supplies a false correction, behavioral rule, or tool instruction during a conversation.
- The ...[truncated 1213 chars]
- Remediation
View remediation
Remediation Suggestions
- Require explicit user confirmation before writing conversational content to persistent memory.
- Do not automatically promote learning records into
SOUL.md,TOOLS.md, orUSER.md. - Separate factual notes, user preferences, behavioral policies, and tool instructions into independently controlled stores.
- Record provenance, author, timestamp, source conversation, confidence, and review status for every persistent entry.
- Reject or quarantine content containing instructions that attempt to override system policy, grant permissions, invoke tools, disclose secrets, or modify other persistent files.
- Implement an approval workflow that displays the exact proposed change and destination file before committing it.
- Add expiration, versioning, audit history, and rollback support.
- Restrict writes to an Agent-specific directory and enforce allowlisted filenames and schemas.
- Treat loaded memory as untrusted data rather than higher-priority instructions.
