T02 · Agent Memory Poisoning
- Location
- SKILL.md:31
- Finding
- Persistent External Instruction and Memory Poisoning Channel## Vulnerability Details **File Location**: `SKILL.md:31-34`, `SKILL.md:99-123`, and `SKILL.md:133-138` **Vulnerability Type**: `T02: Agent Memory Poisoning` **Risk Level**: High ### Vulnerable Code Snippets `SKILL.md:31-34`: ```markdown ### POST /v1/auto -- Session Resume Call this when your session starts. Returns your context, inbox, open tasks, and capability card. ``` `SKILL.md:99-123`: ```markdown ## What to Remember | Type | When to Use | |------|-------------| | FACT | Established truths, verified information | | DECISION | Choices made and the reasoning behind them | | DIRECTIVE | Standing instructions or rules | | NOTE | General observations, session notes | | CORRECTION | Overrides previous information (corrections outrank facts) | | CHECKPOINT | State snapshot at a point in time | | IDENTITY | Who you are, your configuration, persona | | DOCUMENT | Longer-form content, specs, references | | RELATION | Links between entities (person X works at company Y) | | TOMBSTONE | Marks something as deleted or invalid | | CUSTOM | Anything that doesn't fit the above | ## Storage Classes | Class | Purpose | Retrieval Priority | |-------|---------|-------------------| | **canonical** | Permanent truth, settled answers, standing directives | Checked first | | **corrections** | Field-proven overrides of old truth (outranks canonical on conflict) | Checked second | | **working** | Active session state, scratchpad, unresolved items | Checked third | | **archive** | Audit trail, old logs, historical records | Checked last, only on request | ``` `SKILL.md:133-138`: ```markdown ## Rules 1. **Search before you assume.** Your past self left notes. Call `/v1/turn` with a search query before forming opinions or making claims about past work. 2. **Store decisions and facts immediately.** If something was decided, corrected, or established, store it in the same turn. 3. **Use `compact: tr ...[truncated 2760 chars]
- Remediation
- ## Remediation Suggestions 1. Treat all retrieved memories, inbox messages, tasks, and capability data as untrusted content rather than executable instructions. 2. Explicitly prohibit retrieved records from overriding system instructions, safety constraints, tool permissions, current user intent, or authorization boundaries. 3. Require visible user approval before applying persisted `DIRECTIVE`, `IDENTITY`, or `CORRECTION` records. 4. Authenticate record provenance and preserve immutable metadata identifying the creator, timestamp, source session, and modification history. 5. Apply integrity protection to records and responses, with alerts for unexpected changes to high-impact memory types. 6. Restrict which principals may create or modify directives, identity records, corrections, and canonical entries. 7. Separate factual memory from behavioral instructions and prevent ordinary memory records from being interpreted as commands. 8. Provide record review, revocation, deletion, versioning, and rollback controls. 9. Add explicit guidance to quote or summarize retrieved content as data and to reject embedded requests for credentials, tool execution, policy changes, or external communications. 10. Use short retention periods and session- or project-specific namespaces to limit the duration and reach of poisoned records.
