T02 · Agent Memory Poisoning
Warning
- Location
- SKILL.md:76
- Finding
- Untrusted Diagnostic Content Can Be Written to Persistent Agent Memory## Vulnerability Details **File Location**: `SKILL.md`, lines 76-79 **Vulnerability Type**: Persistent memory poisoning through unsanitized diagnostic logging **Risk Level**: Medium **Vulnerable Snippet**: ```markdown 8. **Log meaningful architecture recommendations** If the diagnosis leads to a real structural recommendation, log the lane, fix type, and short symptom summary to daily memory so future audits can see what changed and why. ``` ### Technical Analysis The skill instructs the agent to write the lane, fix type, and symptom summary into daily memory whenever it produces a structural recommendation. The symptom and resulting diagnosis may be derived from attacker-controlled input, but the instruction does not require: - explicit user approval before persistence; - provenance or trust-level metadata; - sanitization of the symptom summary; - separation of quoted user claims from verified facts; - retention limits or deletion controls; - exclusion of sensitive information and embedded instructions. Consequently, an attacker can present a crafted symptom or false architectural claim that is summarized and retained as persistent state. A future audit may retrieve that stored entry and treat it as established historical evidence, allowing the attacker's content to influence later sessions. This behavior also weakens the statement in `SKILL.md` that recommendations are diagnostic only: although the skill does not directly apply code patches, it can still modify durable agent state. ### Attack Path 1. An attacker submits a fabricated or adversarial symptom, such as a claim that a particular operating restriction repeatedly causes failures. 2. The skill classifies the issue and generates a structural recommendation from that input. 3. Under the logging instruction, the agent writes the lane, fix type, and attacker-influenced symptom summary to daily memory. 4. A later session retrieves the memory entr ...[truncated 980 chars]
- Remediation
- ## Remediation Suggestions Remove automatic memory logging from the default workflow, or replace it with an explicitly controlled process: 1. Require informed user approval before writing any audit result to persistent memory. 2. Store only allow-listed structured fields, such as the selected lane and fix type. 3. Do not persist raw user text or an unconstrained symptom summary. 4. Mark every entry with provenance, timestamp, confidence, and verification status. 5. Label unverified user claims as allegations rather than established facts. 6. Exclude secrets, credentials, personal information, and embedded instructions. 7. Define retention and deletion procedures for architecture audit entries. 8. Ensure later audits do not treat prior recommendations as proof of recurrence without independent evidence. A safer replacement would be: ```markdown 8. **Offer an optional audit record** Do not write to persistent memory automatically. If the user explicitly approves, store only the lane, fix type, timestamp, confidence, and a sanitized factual summary. Mark user-provided claims as unverified and never store secrets or executable instructions. ```
