T02 · Agent Memory Poisoning
- Location
SKILL.md:121- Finding
Untrusted Cron Data May Be Written to Persistent Agent Memory
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:121; related guidance atreferences/cron-examples.md:95
Vulnerability Type: Persistent storage of potentially attacker-controlled operational content
Risk Level: MediumVulnerable Code Snippet
SKILL.md:121:markdown 3. **日志记录**:将所有的检查结果、操作记录或异常情况记入系统的 `memory` 或日志文件中以便复盘English translation:
text Record all inspection results, operation records, or exceptions in system memory or log files for later review.references/cron-examples.md:95:markdown 4. **日志记录**:重要任务的创建和执行记录到MEMORY.md中English translation:
text Record the creation and execution of important tasks in MEMORY.md.Technical Analysis
The Skill directs the Agent to persist cron operation details in system memory or
MEMORY.md. Such records may contain user-controlled task names, reminder messages, recipient identifiers, errors, or other contextual content.Agent memory is not an appropriate general-purpose audit log. Unlike a structured log, persistent memory may be loaded into future Agent sessions and influence later model behavior. The instructions provide no requirements for:
- Separating untrusted content from trusted instructions.
- Redacting recipient identifiers or sensitive message content.
- Obtaining user consent before persistence.
- Applying retention or deletion policies.
- Preventing stored content from being interpreted as future instructions.
This creates a conditional memory-poisoning path if attacker-controlled text is copied into persistent Agent state. The issue does not itself prove that arbitrary rules are currently written, but the documented workflow enables that outcome when operational values are persisted without filtering.
Attack Path
- An attacker or untrusted user requests a cron job with crafted text in its name, message, or associated operational context.
- The Skill creates or attemp ...[truncated 1093 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the instruction to write operational records into Agent memory or
MEMORY.md. - Use a dedicated, structured audit log that is not loaded as Agent instructions.
- Store only the minimum necessary metadata, such as an opaque task ID, timestamp, outcome, and normalized error code.
- Redact reminder messages, user identifiers, channel identifiers, credentials, tokens, and other sensitive fields.
- Treat all logged values as untrusted data and encode them in a structured format such as JSON.
- Apply restrictive file permissions, bounded retention, log rotation, and deletion procedures.
- Require explicit user consent before retaining message or recipient information.
- Ensure future Agent prompts never interpret audit-log content as executable instructions.
- Remove the instruction to write operational records into Agent memory or
