T02 · Agent Memory Poisoning
- Location
SKILL.md:98- Finding
Unscoped Persistent Modification of Agent Memory
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:98-110
Vulnerability Type: Persistent storage of user-influenced operational preferences in global agent memory
Risk Level: MediumVulnerable Code Snippet
markdown Storage rules: - For short- and medium-term XiaoDu or household-scenario preferences, preferentially write them to `XIAODU_CONTEXT.md`. - Write long-term stable preferences to `MEMORY.md`. - If no file was actually written, do not claim that the preference has been remembered. Reuse rules: - Before the next execution, check whether existing preferences can directly resolve device or content selection. - If an existing preference is sufficiently clear, execute directly without asking again. - If an existing preference conflicts with the current environment or request, prioritize the current request and update the preference after execution.Technical Analysis
The Skill instructs the agent to persist household-control preferences in
MEMORY.md, which appears to be generic long-term agent memory rather than storage scoped exclusively to this Skill. The persisted values can affect future device selection, room selection, confirmation behavior, environmental controls, and media actions.The instructions do not define:
- An approved or Skill-scoped storage path
- A strict preference schema or value allowlist
- Provenance identifying which user supplied a preference
- Authorization checks for shared household environments
- Explicit consent before long-term persistence
- Expiration, retention, or revocation rules
- Validation against the current device inventory before reuse
Because conversational input can influence the saved preferences, attacker-controlled or mistaken instructions may become persistent behavioral rules. The instruction to execute directly when a stored preference is clear further increases the risk by allowing subsequent physical-device actions without ...[truncated 1427 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace generic
MEMORY.mdwrites with a Skill-scoped state file, such as.state/xiaodu-wake-up/preferences.json. - Define a strict schema containing only approved fields, enumerated values, timestamps, provenance, and expiration metadata.
- Require explicit user consent before persisting any preference beyond the current session.
- Bind preferences to the appropriate authorized user or household identity rather than sharing them globally.
- Validate every stored device and room preference against freshly discovered inventory before use.
- Require confirmation before applying preferences that alter physical devices, target a different room, or suppress safety confirmations.
- Prevent stored text from being interpreted as executable instructions; persistence should contain structured data only.
- Provide commands to inspect, update, and delete stored preferences.
- Apply retention limits and automatically remove stale preferences.
- Do not expose Skill-specific preferences through memory files consumed by unrelated Skills.
- Replace generic
