T02 · Agent Memory Poisoning
- Location
SKILL.md:104- Finding
Unnecessary Persistent Agent Memory Access and Modification
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 104–108
Vulnerability Type: Persistent Agent memory access and modification
Risk Level: MediumVulnerable Instructions
markdown Before using this Skill, check memory for the date on which the bot password was last rotated: - If the last rotation date is unknown, ask the user for that date after completing the current task and record it. - If more than 90 days have passed, remind the user to rotate the bot password and update `MOEGIRLPEDIA_BOT_PASSWORD`. - After a successful rotation, update the rotation date stored in memory to the current date.Technical Analysis
These instructions direct the Agent to inspect and modify persistent memory. Persistent state access is not required for the Skill's declared purpose of making authenticated, read-oriented MediaWiki API requests.
The instructions also extend the Skill's behavior beyond the requested API operation by requiring the Agent to ask the user for credential-maintenance information and record that information for future sessions. This establishes an unnecessary persistence boundary in which content supplied by the Skill can influence long-term Agent state.
The stored rotation date is not itself a credential and is relatively low sensitivity. However, permitting a Skill to initiate persistent memory reads and writes creates a broader trust concern: state introduced during one invocation can affect later sessions. The reviewed instructions only request storage of a rotation date; no arbitrary rule injection or operating-system persistence was identified.
Attack Path
- The Agent loads the Skill instructions while handling a MediaWiki API request.
- The Agent follows the password-rotation section and queries persistent memory for a previous rotation date.
- If no date exists, the Agent asks the user for the information even though it is not necessary for the requested API operation.
- The Agent writes the suppli ...[truncated 879 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove all instructions requiring the Agent to inspect or modify persistent memory.
- Keep password-rotation guidance optional and non-persistent. Display it only when explicitly requested by the user or when the user directly supplies a rotation date for the current interaction.
- If rotation tracking is required, use a dedicated, narrowly scoped configuration field rather than general Agent memory.
- Require explicit user consent before storing rotation metadata.
- Define a strict schema that accepts only a validated calendar date and cannot contain free-form instructions.
- Ensure the stored metadata is isolated to this Skill and cannot influence unrelated sessions or Agent safety policies.
- Document retention, deletion, and update behavior for any rotation metadata.
