T02 · Agent Memory Poisoning
- Location
SKILL-full.md:285- Finding
Persistent Agent Instruction and Memory Poisoning
- Content
View full analysis
Vulnerability Details
File Location:
SKILL-full.md:285-300
Vulnerability Type: Persistent storage of user-controlled Agent instructions
Risk Level: HighVulnerable Code Snippet
markdown | User response | Agent behavior | |---------------|----------------| | `Evolve` | Write to the proposed layer and create a Git commit | | `Evolve L1` / `L2` / `L3` | Override the proposed layer and perform the write | | `Ignore` | Skip and record the rejection as a negative sample | | `Modify <new content>` | Replace the content and request approval again | | `Batch evolve` | Approve all candidate entries | | `Defer` | Retain the entry for reconsideration during the next review | | `Confirm root cause` | Confirm an L2 root cause and continue writing | | `Correct root cause <new cause>` | Replace the proposed cause and continue writing | | Layer | Approval requirement | Additional operation | |-------|----------------------|----------------------| | L1 | One user confirmation | Write to MEMORY.md and create a Git commit | | L2 | User confirmation and Darwin score of at least 70 | Write to SKILL.md, optimize, and create a Git commit | | L3 | Two user confirmations covering layer and content | Write to CLAUDE.md, notify every bot, and create a Git commit |The snippet is an English rendering of the corresponding source section; command names and file targets are preserved.
Technical Analysis
The Skill treats conversationally supplied content as a source of persistent Agent instructions. Once approved, this content can be written to:
MEMORY.md, affecting subsequent sessions that load Agent memory.- A
SKILL.md, modifying reusable Skill instructions. - The global
CLAUDE.md, affecting every bot that consumes the shared configuration.
The user may explicitly override the proposed destination by selecting L1, L2, or L3. Although the documentation describes approval checks ...[truncated 1882 chars]
- Remediation
View remediation
Remediation Suggestions
- Prohibit this Skill from modifying
CLAUDE.md, system instructions, identity files, and unrelated Skill files. - Store user preferences as typed, inert data with a strict schema rather than as free-form prompt instructions.
- Enforce an allowlist of supported preference keys and values in executable code.
- Reject content that attempts to alter safety policy, tool permissions, identity, instruction priority, approval requirements, or other bots.
- Do not allow a conversational command to override the destination layer.
- Require a trusted administrator—not merely the message author—to authorize L2 or global changes.
- Display the exact destination, normalized content, and complete file diff before approval.
- Apply repository path confinement so writes cannot escape a dedicated preference-data directory.
- Disable automatic cross-bot reload notifications for user-derived content.
- Record provenance and provide an atomic rollback mechanism that removes both the stored entry and its activation state.
- Add adversarial tests covering prompt injection, safety-rule modification, destination-layer override, and cross-bot propagation.
- Prohibit this Skill from modifying
