T02 · Agent Memory Poisoning
- Location
hooks/handler.js:286- Finding
Persistent memory poisoning through verbatim message storage and context injection
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This memory skill is locally scoped and purpose-aligned, but it automatically persists and reinjects conversation content through persistent hooks and cron jobs without strong user controls.
Review this skill carefully before installing. It is not showing network theft or destructive behavior, but it will create persistent local memory, session notes, hooks, and scheduled jobs that can retain sensitive prompt content and bring old memory back into future conversations. Install only if you want automatic local conversation memory, and be prepared to disable the hook and cron jobs and clean the memory files if needed.
hooks/handler.js:286Persistent memory poisoning through verbatim message storage and context injection
hooks/handler.js:260Automatic plaintext retention of potentially sensitive user messages
scripts/install.js:45Automatic installation of persistent hooks and recurring main-session jobs
scripts/install.js:18Shell command injection through environment-derived installation paths
scripts/dream-consolidate.js:61JavaScript maintenance scripts are incorrectly executed by Bash
Manual CLI search invoking a separate loader script is a notable behavioral detail if it is undeclared, because chained script execution increases complexity and can surprise operators about what code runs when a simple search command is used. In a local-skill context this is less severe than remote code execution, but it still affects transparency and reviewability.
Manual CLI search invoking a separate loader script is a notable behavioral detail if it is undeclared, because chained script execution increases complexity and can surprise operators about what code runs when a simple search command is used. In a local-skill context this is less severe than remote code execution, but it still affects transparency and reviewability.
Manual CLI search invoking a separate loader script is a notable behavioral detail if it is undeclared, because chained script execution increases complexity and can surprise operators about what code runs when a simple search command is used. In a local-skill context this is less severe than remote code execution, but it still affects transparency and reviewability.
Manual CLI search invoking a separate loader script is a notable behavioral detail if it is undeclared, because chained script execution increases complexity and can surprise operators about what code runs when a simple search command is used. In a local-skill context this is less severe than remote code execution, but it still affects transparency and reviewability.
Manual CLI search invoking a separate loader script is a notable behavioral detail if it is undeclared, because chained script execution increases complexity and can surprise operators about what code runs when a simple search command is used. In a local-skill context this is less severe than remote code execution, but it still affects transparency and reviewability.
Manual CLI search invoking a separate loader script is a notable behavioral detail if it is undeclared, because chained script execution increases complexity and can surprise operators about what code runs when a simple search command is used. In a local-skill context this is less severe than remote code execution, but it still affects transparency and reviewability.
Manual CLI search invoking a separate loader script is a notable behavioral detail if it is undeclared, because chained script execution increases complexity and can surprise operators about what code runs when a simple search command is used. In a local-skill context this is less severe than remote code execution, but it still affects transparency and reviewability.
Manual CLI search invoking a separate loader script is a notable behavioral detail if it is undeclared, because chained script execution increases complexity and can surprise operators about what code runs when a simple search command is used. In a local-skill context this is less severe than remote code execution, but it still affects transparency and reviewability.
Manual CLI search invoking a separate loader script is a notable behavioral detail if it is undeclared, because chained script execution increases complexity and can surprise operators about what code runs when a simple search command is used. In a local-skill context this is less severe than remote code execution, but it still affects transparency and reviewability.
Manual CLI search invoking a separate loader script is a notable behavioral detail if it is undeclared, because chained script execution increases complexity and can surprise operators about what code runs when a simple search command is used. In a local-skill context this is less severe than remote code execution, but it still affects transparency and reviewability.
Manual CLI search invoking a separate loader script is a notable behavioral detail if it is undeclared, because chained script execution increases complexity and can surprise operators about what code runs when a simple search command is used. In a local-skill context this is less severe than remote code execution, but it still affects transparency and reviewability.
Manual CLI search invoking a separate loader script is a notable behavioral detail if it is undeclared, because chained script execution increases complexity and can surprise operators about what code runs when a simple search command is used. In a local-skill context this is less severe than remote code execution, but it still affects transparency and reviewability.
Manual CLI search invoking a separate loader script is a notable behavioral detail if it is undeclared, because chained script execution increases complexity and can surprise operators about what code runs when a simple search command is used. In a local-skill context this is less severe than remote code execution, but it still affects transparency and reviewability.
The hook is registered for every message:received event and the documented trigger terms are so broad that ordinary conversation is likely to activate memory search. This creates excessive collection and context injection behavior, increasing the chance that unrelated or sensitive prior data is surfaced without clear user intent or narrow scoping.
The skill states that it automatically extracts persistent memory from every user message and writes session notes, yet no notice, consent, retention limit, or opt-out is described. This is dangerous because users may disclose secrets, personal data, or project-sensitive information that gets silently persisted and later reused or exposed.
The skill advertises installation and automated hook/cron behavior that imply environment and execution capabilities, but it declares no explicit tool scope or permissions. In a security-sensitive agent ecosystem, missing capability declarations weakens user consent and policy enforcement because the skill can access local workspace state and invoke surrounding tooling without transparent scoping.
A skill that automatically captures, searches, summarizes, and persists conversation content via hooks and cron jobs creates a significant privacy and data-governance risk if that collection is not disclosed prominently. Users may reveal sensitive information under the assumption of ephemeral processing, while the skill silently stores it in workspace memory files for later retrieval or injection.
The installation steps describe automatic hook deployment and cron registration, but do not prominently warn that this enables ongoing background persistence and automated file modifications. In context, that makes the skill more dangerous because it is not just an on-demand utility; it becomes a persistent component that can continuously process and store user conversations.
Natural-language instructions and descriptions throughout the file are presented in Chinese, with no indication that the user can select another language or that the skill is intentionally restricted to a Chinese-speaking context. This can violate a language/locale policy when a skill forces a specific language without user opt-in.
Automatically extracting and storing content from every user message creates a persistent data retention risk, because free-form chat often contains personal, confidential, or security-relevant information. Once stored in categorized memory paths, that information may be unintentionally retrieved, leaked to later contexts, or retained longer than necessary.
Persistent session-note logging of ongoing conversations creates a continuous transcript trail that can accumulate sensitive user and project information. Even if intended for convenience, such logs expand the attack surface and raise the risk of unauthorized disclosure, over-retention, and cross-session privacy leakage.
The hook is designed to auto-load memory into SESSION-STATE.md cache during bootstrap, meaning session state is updated implicitly before the user takes action. While this aligns with the skill's memory-management purpose, silent mutation of session context can affect privacy, auditability, and user expectations if prior memory is injected without clear notice.
The bootstrap hook implicitly spawns a shell via bash during agent startup, which increases attack surface because startup execution happens automatically and without user review. Even though the script path is hardcoded under the skill workspace, any compromise or unexpected modification of that script results in arbitrary code execution every time the agent boots.
This hook performs subprocess execution automatically on agent:bootstrap with no user-facing warning or consent. Silent execution at startup is risky because it creates a persistence-like mechanism: users may not realize code is being run, and any malicious change to the invoked script will execute repeatedly and implicitly.
The documented behavior combines automatic memory search, memory extraction, and session-note tracking over all received messages, meaning user-provided content is broadly retained and reused across multiple persistence and retrieval paths. In a memory-management skill this context makes the issue more dangerous, not less, because the entire purpose is to capture and later surface prior conversation data, increasing the chance of unintended disclosure of sensitive information into future prompts or local files.