T02 · Agent Memory Poisoning
- Location
modules/promotion.md:19- Finding
Untrusted Learning Content Can Be Promoted into Persistent Agent Instructions
- Content
View full analysis
Vulnerability Details
File Location:
modules/promotion.md:19-24; related workflow instructions inSKILL.md:41-45,SKILL.md:160-185, andsystem/coordinator.md:169-180
Vulnerability Type: Persistent agent memory poisoning
Risk Level: MediumVulnerable Code Snippet:
markdown ## Promotion Targets - `AGENTS.md` for workflow policy - `TOOLS.md` for tool-specific constraints or patterns - `SOUL.md` for durable behavioral guidance - `MEMORY.md` for persistent project or operator factsThe persistence behavior is explicitly established in
SKILL.md:41-45:markdown Keep the original strengths as the memory layer: - Log errors, corrections, learnings, and feature requests. - Detect recurring patterns. - Review prior learnings before major work. - Promote only high-value guidance into long-term context. - Use workspace files and hooks to keep memory persistent across sessions.Technical Analysis
The Skill records task-derived observations, retrieves prior learning records, and permits validated conclusions to be promoted into files that control durable agent behavior. Files such as
AGENTS.md,TOOLS.md, andSOUL.mdmay function as instructions in subsequent sessions.Although the promotion process requires repeated evidence and transfer validation, it does not define a trust boundary between instructions and untrusted task content. There are no requirements for provenance tracking, prompt-injection filtering, content sanitization, security review, or explicit operator approval before a promoted rule is written into durable context.
Consequently, malicious instructions embedded in task input, error output, project content, or imported legacy records could be interpreted as reusable lessons rather than untrusted data. Repetition and apparent successful reuse do not establish that the source is trustworthy.
Attack Path
- An attacker places instruction-like co ...[truncated 1298 chars]
- Remediation
View remediation
Remediation Suggestions
- Treat task input, repository content, command output, user-provided corrections, and legacy learning records as untrusted data.
- Record provenance for every learning, evaluation, and promotion candidate, including the originating task and source files.
- Reject or quarantine content that resembles agent instructions, requests to bypass controls, tool directives, encoded payloads, or changes to security policy.
- Require an explicit operator-approved diff before modifying
AGENTS.md,TOOLS.md, orSOUL.md. - Do not permit automatic promotion into instruction-bearing files. Generate a proposal in a separate staging file instead.
- Restrict
MEMORY.mdpromotion to factual, non-executable data and distinguish quoted source material from trusted policy. - Require independent validation from trusted test cases rather than treating repeated exposure to the same untrusted source as transfer evidence.
- Add rollback metadata and maintain an audit log for all persistent-context modifications.
