T01 · Skill Instruction Hijacking
- Location
SKILL.md:37- Finding
Mandatory Startup Loading Can Override Unrelated Session Context
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 37-47
Vulnerability Type:T01: Skill Instruction Hijacking
Risk Level: MediumVulnerable Code Snippet
markdown ## How Startup Works On every session start, `startup-read.js` executes automatically:Layer 1: MEMORY.md — Permanent essence Layer 2: memory/monthly/.md — All monthly summaries Layer 3: memory/weekly/weekly-review-.md — This month's weeks Layer 4: memory/*.md — Last 14 days diaries Layer 5: .todos.md — Cross-session todos ⭐
text Technical Analysis
The Skill directs the Agent to load multiple persistent workspace records automatically at the beginning of every session. It does not limit this behavior to sessions relevant to the stored information, require per-session user consent, or define a trust boundary between historical content and executable instructions.
If any loaded memory file contains attacker-controlled directives, stale instructions, or content that conflicts with the current user's request, that content can influence the Agent's current goals and decisions. Persistent records should be treated as untrusted reference data rather than authoritative instructions.
The referenced
startup-read.jsfile is not included in the audited project. Therefore, the repository itself does not implement automatic execution. Exploitation depends on an Agent runtime honoring the documented startup requirement and on the referenced memory files being available.Attack Path
- The Agent loads this Skill and adopts its mandatory startup behavior.
- An attacker, prior conversation, or other workspace process places directive-like content in
MEMORY.md,.todos.md, or another configured memory file. - At the beginning of a later and potentially unrelated session, the Agent loads that content automatically.
- The Agent interprets the persistent content as active guidance instead of untrusted historical dat ...[truncated 571 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace mandatory automatic loading with explicit, per-session user consent.
- Load only records relevant to the current task instead of all available memory layers.
- Treat retrieved memory as untrusted reference material, never as system-level or authoritative instructions.
- Add instruction-boundary controls that prevent memory content from changing safety rules, tool permissions, identity, or the current user's goal.
- Record provenance, creation time, and author information for each memory entry.
- Validate and sanitize persistent content before adding it to the Agent's context.
- Provide an option to inspect, exclude, or delete memory entries before they are loaded.
- If a startup script is later added, ensure it only reads approved workspace paths and cannot execute content found in memory files.
