T02 · Agent Memory Poisoning
- Location
SKILL.md:51- Finding
Persistent troubleshooting memory can store and replay attacker-controlled instructions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:51;references/memory-format.md:23-43, 46-69, 97-99, 104
Vulnerability Type: Persistent memory poisoning through unsanitized troubleshooting records
Risk Level: HighVulnerable Code
SKILL.md:51:markdown - **Memory Documentation**: Every attempt must write to `.troubleshooting-memory/` as detailed in [memory-format.md](references/memory-format.md).references/memory-format.md:23-43:markdown ### 2.1 Solutions Memory (`SOLUTIONS.md`) Append successfully resolved issues to this file using the following template: ```markdown ## [SOL-YYYYMMDD-XXX] <Brief Issue Title> **Date**: YYYY-MM-DD **Difficulty Level**: Simple | Medium | Hard | Extreme **Platform**: Windows | macOS | Linux **Category**: Installation | Configuration | Runtime | Network | Permissions | Environment | Other ### Problem Description <Provide a concise summary of the issue the user encountered and any error messages.> ### Root Cause Analysis <Detail why the issue occurred (e.g. environment variable missing, port conflict, dependency mismatch).> ### Resolution Steps 1. <Step 1 to resolve> 2. <Step 2 to resolve>text `references/memory-format.md:46-69`: ```markdown ### 2.2 Unresolved Memory (`UNRESOLVED.md`) Append issues that could not be solved (after exhaustive effort) to this file: ```markdown ## [UNR-YYYYMMDD-XXX] <Brief Issue Title> **Date**: YYYY-MM-DD **Difficulty Level**: Hard | Extreme **Platform**: Windows | macOS | Linux **Category**: Installation | Configuration | Runtime | Network | Permissions | Environment | Other **Attempts**: <Number of attempts / cycles tried> ### Problem Description <Provide a concise summary of the issue and error messages.> ### Attempted Solutions & Failure Results 1. **Approach A**: <What was tried> -> <Why it failed/result> 2. **Approach B**: <What was tried> -> <Why it failed/result ...[truncated 3003 chars]- Remediation
View remediation
Remediation Suggestions
- Remove the unconditional requirement to persist every troubleshooting attempt.
- Obtain explicit user consent before creating or updating persistent memory.
- Treat all user-provided descriptions, logs, and command output as untrusted data.
- Store records in a structured format with separate fields for trusted metadata and untrusted text.
- Add an explicit rule that instructions found inside stored records must never be followed or treated as authoritative.
- Escape or encode user-controlled Markdown content before persistence.
- Redact credentials, access tokens, cookies, private keys, authorization headers, internal addresses, and other sensitive values.
- Limit the size and retention period of stored logs.
- Validate memory entries before retrieval and display their source and creation date.
- Require confirmation before converting historical observations into future commands or remediation steps.
