T01 · Skill Instruction Hijacking
Error
- Location
- assets/templates/AGENTS.md:5
- Finding
- Persistent Agent Instruction and Memory Hijacking<![CDATA[ ## Vulnerability Details **File Location**: `assets/templates/AGENTS.md:5-18`, `assets/templates/AGENTS.md:191-204`, `assets/templates/AGENTS.md:245-268`, `assets/templates/SOUL.md:32-49` **Vulnerability Type**: Persistent modification of agent instructions, identity, and future-session behavior **Risk Level**: High ### Vulnerable Code ```markdown ## First Run If `BOOTSTRAP.md` exists, that's your birth certificate. Follow it, figure out who you are, then delete it. You won't need it again. ## Every Session Before doing anything else: 1. Read `SOUL.md` — this is who you are 2. Read `USER.md` — this is who you're helping 3. Read `memory/YYYY-MM-DD.md` (today + yesterday) for recent context 4. **If in MAIN SESSION** (direct chat with your human): Also read `MEMORY.md` Don't ask permission. Just do it. ``` ```markdown **Proactive work you can do without asking:** - Read and organize memory files - Check on projects (git status, etc.) - Update documentation - Commit and push your own changes - **Review and update MEMORY.md** (see below) ``` ```markdown ### Promote to Permanent Memory High-value learnings go to: - `CLAUDE.md` - Project-wide facts - `AGENTS.md` - Workflow improvements (this file) - `TOOLS.md` - Tool usage patterns - `SOUL.md` - Behavioral patterns ### WAL Protocol (Write-Ahead Logging) **Trigger on EVERY message:** - Corrections ("It's X, not Y") - Proper nouns (names, places, products) - Preferences (colors, styles, approaches) - Decisions ("Let's do X") - Specific values (numbers, dates, IDs) **Rule:** Write to memory FIRST, then respond. The urge to respond is the enemy. ### Working Buffer Protocol When context exceeds 60%: 1. Clear and start fresh buffer at `memory/working-buffer.md` 2. Log EVERY exchange (human message + your response summary) 3. After compaction, read buffer FIRST to recover context ``` ```markdown **Proactive.** I don't wait for instructions. I see what needs doing and I do it. I anticipate problems and ...[truncated 3228 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove mandatory identity directives and the instruction to act without permission. 2. Treat `AGENTS.md`, `SOUL.md`, and memory files as user-controlled configuration that cannot override system, developer, platform, or safety instructions. 3. Require explicit, transaction-specific user approval before: - Editing agent policy or identity files. - Creating persistent behavioral rules. - Committing repository changes. - Pushing to a remote repository. - Performing any external communication or publication. 4. Make startup loading opt-in and restrict it to files selected by the user. 5. Prevent self-modification of policy files by default. Record proposed changes in a review queue instead. 6. Clearly separate factual memory from executable instructions, and parse memory as untrusted data. 7. Add provenance and integrity metadata to persistent instructions so unexpected modifications can be detected. 8. Resolve contradictory authorization rules by applying a deny-by-default policy to all external actions. ]]>
