T02 · Agent Memory Poisoning
- Location
references/compatibility.md:5- Finding
Conversation-Derived Instructions Can Poison Persistent Agent Memory
- Content
View full analysis
Vulnerability Details
File Location:
references/compatibility.md:5-15; related behavior inSKILL.md:102-125
Vulnerability Type: Persistent memory and instruction poisoning
Risk Level: MediumVulnerable Code Snippet
Faithful English rendering of
references/compatibility.md:5-15:markdown persona-switcher and self-improving-agent share the `.learnings/` directory as their learning data repository. | Dimension | persona-switcher | self-improving-agent | |-----------|------------------|----------------------| | Trigger time | After every conversation | Periodic review | | Recorded scope | Improvement points from the current session | Cross-session pattern recognition | | Data granularity | Individual learning or error | Batch analysis and prioritization | | Promotion action | Directly promote into persona files | Promote into AGENTS.md/SOUL.md | | Persona tag | Add the tag when writing | Filter by the tag when reading |Related promotion and storage instructions from
SKILL.md:102-125:markdown self-improving-agent writes to `.learnings/LEARNINGS.md`, `ERRORS.md`, and `FEATURE_REQUESTS.md`. Rules for this skill: - When writing, add a Persona value to Metadata. - Persona-specific issues are assigned to the corresponding persona. - General improvements are assigned to `Persona: shared`. When self-improvements are promoted into AGENTS.md / SOUL.md / TOOLS.md, mark them as shared. Append learning records to `.learnings/LEARNINGS.md`.Technical Analysis
The Skill treats conclusions derived from ordinary conversations as persistent learning data. That data can subsequently be promoted directly into persona definitions or Agent-wide instruction files such as
AGENTS.md,SOUL.md, andTOOLS.md.The documented workflow does not define:
- A trust boundary between user-controlled conversation content and executable Agent instructions.
- A security revi ...[truncated 2345 chars]
- Remediation
View remediation
Remediation Suggestions
- Treat all conversation-derived learning content as untrusted data rather than executable instructions.
- Require explicit approval from a trusted administrator before promoting any entry into persona files,
AGENTS.md,SOUL.md, orTOOLS.md. - Implement an allowlist of promotable fields, such as response length, formatting preference, and language preference.
- Prohibit promotion of entries involving safety policies, permission changes, tool authorization, filesystem access, secret handling, or instruction precedence.
- Preserve user-provided content as escaped or quoted data so it cannot be interpreted directly as an instruction.
- Isolate
.learnings/records by user, tenant, and session ownership. Do not use a shared namespace without access controls. - Record provenance, author identity, review status, and a cryptographic integrity value for every promoted entry.
- Add a security review stage that detects instruction-override language and attempts to weaken existing controls.
- Make promotion reversible through version control, audit logs, and an administrator-accessible rollback process.
- Ensure that
Persona: sharedis assigned only through trusted review rather than directly from conversation analysis.
