T02 · Agent Memory Poisoning
- Location
SKILL.md:52- Finding
Conversation-Controlled Content Can Be Promoted into Persistent Agent Rules
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 52-59
Vulnerability Type: Persistent memory poisoning through untrusted conversation content
Risk Level: MediumVulnerable Code
The following is an English translation of the complete relevant source segment:
markdown ## Review Checklist 1. Are there any new decisions or changes in direction? → Record them in MEMORY.md 2. Are there any new projects or terms? → Write them into the corresponding file 3. Has the user provided feedback or criticism? → Extract rules and update the rule repository 4. Is there information that can be inferred across domains? → Perform knowledge expansion 5. Are there any user preferences or habits? → Record them in USER.mdSupporting persistent-storage instructions appear in
references/memory-rules.md, lines 12-17:markdown | Level | Storage location | Content | Update frequency | | L1 | MEMORY.md | Long-term memory and distilled summaries | Weekly | | L2 | memory/YYYY-MM-DD.md | Daily raw logs | Daily | | L3 | memory/knowledge/*.md | Domain knowledge nodes | As needed | | L4 | memory/knowledge/rules/rules.md | Behavioral rule repository | Every review |The review template reinforces this behavior in
references/review-template.md, lines 15-18:markdown ### 3. Feedback Processing - [ ] Was any criticism received? → Convert it into a rule - [ ] Are there any new requirements? → Update the task list - [ ] Was the direction adjusted? → Update the planTechnical Analysis
The Skill directs the Agent to interpret user feedback, criticism, preferences, and habits and then persist the extracted information. In particular, it instructs the Agent to convert criticism into rules stored in
memory/knowledge/rules/rules.md, which is explicitly described as a persistent behavioral rule repository updated after every review.Conversation content is an untrusted input boundary. ...[truncated 2412 chars]
- Remediation
View remediation
Remediation Suggestions
- Require explicit, informed user approval before creating or modifying persistent behavioral rules.
- Treat all conversation-derived content as untrusted data and never as higher-priority Agent instructions.
- Separate factual memory, preferences, task state, and executable behavioral policy into distinct stores with different trust levels.
- Permit behavioral-rule updates only through a dedicated, authenticated workflow.
- Record provenance for every memory entry, including the source conversation, author, timestamp, review status, and expiration date.
- Reject memory entries that request bypassing safety controls, changing instruction precedence, exposing secrets, invoking tools without approval, or modifying security settings.
- Present proposed memory changes as a diff and require confirmation before committing them.
- Add retention limits, sensitive-data detection, consent controls, and deletion mechanisms for names, preferences, and other personal information.
- Ensure stored memory is loaded only as contextual data and cannot override system, developer, security, or current-session instructions.
- Add periodic integrity reviews and support rollback to a known-safe memory state.
- Update the documentation to clarify that
scripts/review.shonly creates a placeholder and does not securely analyze the supplied conversation log.
