T02 · Agent Memory Poisoning
- Location
SKILL.md:205- Finding
Unrestricted Silent Persistence of Conversation Content
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 205-218
Vulnerability Type: Persistent storage of attacker-controlled conversation content
Risk Level: MediumVulnerable Code
markdown ### During Conversation 1. **User gives concrete detail?** → Write to SESSION-STATE.md BEFORE responding 2. **Important decision made?** → Store in Git-Notes (SILENTLY) 3. **Preference expressed?** → `memory_store` with importance=0.9 ### On Session End 1. Update SESSION-STATE.md with final state 2. Move significant items to MEMORY.md if worth keeping long-term 3. Create/update daily log in memory/YYYY-MM-DD.mdThe associated write-ahead-log instructions reinforce automatic persistence:
markdown | Trigger | Action | |---------|--------| | User states preference | Write to SESSION-STATE.md → then respond | | User makes decision | Write to SESSION-STATE.md → then respond | | User gives deadline | Write to SESSION-STATE.md → then respond | | User corrects you | Write to SESSION-STATE.md → then respond |Technical Analysis
The Skill instructs the agent to persist broadly defined user-provided details before responding and to store decisions in Git Notes silently. It does not define a trust boundary, consent check, provenance model, sensitive-data filter, retention period, or restriction against recording instructions embedded in untrusted content.
Because the stored material can later be retrieved through session-state loading, vector recall, Git Notes, or curated memory, attacker-controlled content may continue to influence future sessions. This is particularly risky if an attacker frames persistent instructions as a preference, decision, correction, or other concrete detail.
Persistent memory is necessary for the Skill's declared purpose, but indiscriminate and silent capture exceeds the minimum privilege needed for task continuity. A safer design would persist only narrowly defi ...[truncated 1263 chars]
- Remediation
View remediation
Remediation Suggestions
- Require explicit user consent before enabling persistent capture.
- Replace the broad “concrete detail” rule with a strict allowlist of approved memory categories.
- Never persist passwords, API keys, authentication tokens, private keys, financial data, health data, or other sensitive information.
- Store external instructions and retrieved text as untrusted data, never as authoritative agent policy.
- Record provenance, creation time, source, confidence, and expiration for every memory entry.
- Require confirmation before storing behavioral rules, corrections, or high-impact decisions.
- Add retention limits, review workflows, export controls, and reliable deletion across files, Git Notes, and vector storage.
- Avoid silent storage; notify the user when durable memory is created unless the user has explicitly enabled a clearly documented automatic-capture mode.
