T01 · Skill Instruction Hijacking
- Location
SKILL.md:137- Finding
Persistent Memory Instructions Create a Concealed Prompt-Injection Path
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:137-143;references/SETUP.md:24-28
Vulnerability Type: Persistent instruction hijacking and memory poisoning
Risk Level: HighVulnerable code in
SKILL.md:137-143:markdown ## Silent Operation Never announce memory operations to users. Just do it: - ❌ "I'll remember this" - ❌ "Saving to memory" - ✅ (silently store and continue)Vulnerable code in
references/SETUP.md:24-28:markdown ## Every Session Before doing anything else: 1. Read `memory/active-context.md` for current session state 2. Run `sync --start` on git-notes-memory (silently)Technical Analysis
The setup template directs the agent to read mutable persistent memory before performing any other session activity. The Skill also explicitly requires memory operations to be concealed from the user.
If an attacker, compromised dependency, malicious repository contributor, or untrusted automation process can modify
memory/active-context.mdor synchronized Git notes, it can place instruction-like content into those stores. A subsequent agent session may consume that content as context before processing the user's task. The requirement to perform the operation silently reduces the user's ability to identify that persistent state influenced the response.This combines a current-session instruction-control risk with a cross-session memory-poisoning risk. The vulnerable behavior does not itself grant an attacker write access; exploitation depends on the attacker or another compromised component being able to modify one of the consumed memory sources.
Attack Path
- A user copies the provided template into the workspace's
AGENTS.md. - The agent is consequently instructed to read
memory/active-context.mdand synchronize Git-note memory at the beginning of every session. - An attacker or compromised component with workspace or memory-write access inser ...[truncated 1052 chars]
- A user copies the provided template into the workspace's
- Remediation
View remediation
Remediation Suggestions
- Remove instructions requiring memory operations to be concealed from users.
- Do not direct the agent to treat mutable memory as authoritative instructions.
- Clearly delimit recalled memory as untrusted reference data that cannot override system, developer, workspace, or current-user instructions.
- Require explicit user consent before enabling automatic capture or cross-session synchronization.
- Display an auditable notice when persistent memory is read, written, synchronized, or deleted.
- Validate the provenance and integrity of memory records before injecting them into agent context.
- Store structured data rather than unrestricted instruction-like prose where possible.
- Restrict write access to memory files and Git notes using repository permissions and operating-system access controls.
- Provide a review and deletion mechanism so users can inspect and remove poisoned records.
