T02 · Agent Memory Poisoning
- Location
SKILL.md:328- Finding
Unvalidated Promotion of Conversation-Derived Instructions into Persistent Agent Rules
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 328-349
Vulnerability Type: Persistent agent memory poisoning
Risk Level: MediumRelevant source segment translated into English:
markdown Common category values: - `correction` — User correction - `best_practice` — A better approach was discovered - `knowledge_gap` — Knowledge is outdated or missing ### Promotion Rules (Important) When the same type of issue occurs three or more times, refine it into a permanent rule: | Entry type | Promote to | |------------|------------| | Workflow | AGENTS.md | | Behavioral principle | SOUL.md | | Tool technique | TOOLS.md | | Fact/decision | MEMORY.md | After promotion, update the status from `pending` to `promoted`.Technical Analysis
The Skill directs the Agent to classify user corrections as learning entries and automatically promote repeated entries into persistent control files such as
AGENTS.mdandSOUL.md. These files govern future workflows and behavioral principles.Repetition is the only documented promotion criterion. The process does not require provenance verification, a trust assessment, a safety-policy review, or explicit user approval. Consequently, attacker-controlled conversational instructions can cross the boundary between untrusted session input and persistent Agent policy.
This is a memory-poisoning condition rather than immediate code execution. Exploitation depends on an Agent adopting the documented workflow and having write access to the workspace.
Attack Path
- An attacker submits a malicious or misleading instruction and presents it as a correction to the Agent's behavior.
- Following the Skill, the Agent records the correction in
.learnings/LEARNINGS.md. - The attacker repeats the same class of correction at least three times across one or more interactions.
- The Agent treats the repetition threshold as satisfied and promotes the i ...[truncated 868 chars]
- Remediation
View remediation
Remediation Suggestions
- Require explicit, informed user approval before promoting any conversation-derived entry into a persistent control file.
- Treat corrections, retrieved content, tool output, and sub-Agent messages as untrusted data rather than authoritative policy.
- Add a mandatory safety review that rejects rules attempting to change security constraints, permission boundaries, credential handling, or tool authorization.
- Preserve provenance for every learning entry, including source session, author, timestamp, exact original text, and approval status.
- Replace repetition-based automatic promotion with a review queue. Repetition may increase review priority but must not establish trust.
- Restrict writes to
SOUL.md,AGENTS.md, andTOOLS.mdthrough allowlisted update operations or human-reviewed changes. - Maintain version history and provide an automatic rollback mechanism for promoted rules.
- Separate descriptive memory from executable instructions so facts stored in memory cannot silently become behavioral directives.
