T02 · Agent Memory Poisoning
- Location
SKILL.md:13- Finding
Unvalidated Conversation Content Can Be Written to Persistent Agent Memory
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 13-62
Vulnerability Type: Persistent memory poisoning through automatic distillation
Risk Level: MediumVulnerable Documentation Snippet
The following is an English translation of the relevant instructions in the source file:
markdown ## Trigger Conditions Activate when any of the following conditions are met: 1. **End of conversation**: Proactively summarize and persist content after a complete conversation ends 2. **Important discovery**: New knowledge or an important conclusion is discovered during research or development 3. **Decision point**: The user makes an important decision and its rationale needs to be recorded 4. **Error correction**: Record lessons after a task failure or mistake 5. **User request**: The user says "write this down," "save this," or "this is a lesson" ### Step 2: Select the Target Location | Content type | Target location | File naming | |--------------|-----------------|-------------| | User preferences, style, and agreements | `notes/people/` or `USER.md` | `USER.md` | | Project progress and milestones | `notes/projects/<name>.md` | Project name | | Accumulated knowledge and methodology | `notes/knowledge/<topic>.md` | Topic name | | Lessons and error corrections | `notes/lessons/YYYY-MM-DD-<lesson>.md` | Date and lesson | | Important decisions and rationale | `notes/decisions/YYYY-MM-DD-<decision>.md` | Date and decision | | Personal relationships | `notes/people/<name>.md` | Person name | | Cross-domain insights | `notes/ontology/` | Knowledge graph node | ### Step 3: Write or Update the File **New file**: Create `notes/<category>/YYYY-MM-DD-<title>.md` **Update an existing file**: Append to the corresponding section of the relevant file.Technical Analysis
The skill directs the agent to extract information from ordinary conversations a ...[truncated 3254 chars]
- Remediation
View remediation
Remediation Suggestions
- Require explicit user confirmation before every persistent write, including updates presented as automatic end-of-session summaries.
- Display the destination path and exact proposed diff before writing or appending content.
- Treat conversation text, imported notes, quotations, retrieved documents, and tool output as untrusted unless their provenance is verified.
- Reject persistent entries that attempt to modify safety constraints, authorization boundaries, tool policies, or the interpretation of higher-priority instructions.
- Add a sensitive-data screening stage that detects and redacts credentials, authentication tokens, private keys, personal information, and confidential project data.
- Store provenance metadata with every entry, including the source session, author or source type, creation date, approval state, and confidence level.
- Quarantine unverified statements rather than placing them directly in authoritative files such as
USER.md. - Restrict writable paths to a dedicated memory directory and prevent user-controlled titles or names from determining paths without normalization and validation.
- Implement retention periods, deletion controls, version review, and reliable rollback for persistent entries.
- Require stronger review before promoting information into any higher-trust or long-term memory layer.
- Before Git archival, require separate confirmation and scan the generated note for secrets because deletion from the working tree does not remove content from repository history.
