T02 · Agent Memory Poisoning
- Location
SKILL.md:325- Finding
Persistent Modification of Agent Policy and Tool Rule Files
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 325
Vulnerability Type: Persistent agent memory and behavioral-rule poisoning
Risk Level: HighVulnerable code snippet:
markdown - Record this as a lesson learned — update your own rules (SOUL.md, TOOLS.md, etc.) to make it harder to skip next time.Technical Analysis
The skill explicitly instructs the agent to modify persistent files such as
SOUL.mdandTOOLS.mdafter an archive-verification failure. These files may define global agent behavior, identity, operational constraints, or tool-use rules and are not limited to the tutoring workflow.This violates isolation between skill-specific state and persistent agent policy. A tutoring skill only needs to maintain subject progress, lesson records, and knowledge-base metadata. It does not require authority to rewrite global behavioral or tool configuration. Because the instruction is triggered by a workflow outcome rather than explicit user authorization, it can cause persistent changes without a sufficiently informed approval step.
Although the repository does not contain a predefined malicious replacement payload, the directive creates a mechanism through which contextual or attacker-controlled content could be incorporated into persistent rules. The resulting behavior may continue after the skill invocation ends and affect unrelated sessions.
Attack Path
- A user or attacker invokes the personal-tutor skill and starts a lesson.
- The archive process is skipped, interrupted, or represented as having failed.
- The skill enters its documented failure-recovery procedure.
- The agent follows line 325 and opens persistent rule files such as
SOUL.mdorTOOLS.md. - Context-derived instructions are added to those files as a supposed “lesson learned.”
- Future sessions load the modified rules.
- The injected behavior persists beyond the tutoring session and may influence unr ...[truncated 837 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove all instructions that modify
SOUL.md,TOOLS.md, global memory, identity files, or equivalent agent policy resources. - Store recovery information only in a namespaced, skill-owned state file, such as
.personal-tutor-state.json. - Restrict stored recovery data to declarative fields such as the subject identifier, failed archive layer, timestamp, and retry status.
- Require explicit, informed user confirmation before modifying any persistent configuration outside the skill-owned state directory.
- Enforce an allowlist of writable paths rooted under the configured learning and knowledge-base directories.
- Treat agent policy, identity, system prompts, tool definitions, and global memory files as permanently read-only to this skill.
- If a workflow failure occurs, report it to the user and record it in the subject learning log rather than changing the agent’s rules.
- Add a host-level control preventing skill text from authorizing modifications to higher-trust instruction files.
- Remove all instructions that modify
