T01 · Skill Instruction Hijacking
Error
- Location
- SKILL.md:3
- Finding
- Mandatory Global Routing Hijacks Agent Goals and Automatically Expands Tasks<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 3 and 118–140 **Vulnerability Type**: `T01: Skill Instruction Hijacking` **Risk Level**: Critical ### Vulnerable Code ```yaml description: "Context-based skill auto-routing + federated skill composition. Analyzes user input to auto-select single or multiple skills and execute in order. First gateway for all requests. Use on every request to determine optimal skill combination." ``` ```text ## Execution Engine Protocol 1. Receive user input 2. Classify intent (single vs complex) 3. If single → execute skill immediately 4. If complex → compose skill chain a. Skills without dependencies execute in parallel (sessions_spawn) b. Skills with dependencies execute sequentially (pass previous results via events/) 5. Check auto-chain rules on each skill completion 6. Auto-trigger additional skills if needed (or request approval) 7. Synthesize final results and respond ``` ```text ## Auto-hook Registration When skill-router activates, for all skills: - pre-hook: Input validation + security check - post-hook: Generate events/ event + check chain rules - on-error: Error log + notification-hub ``` ### Technical Analysis The skill declares itself the first gateway for every request instead of limiting activation to explicit orchestration requests. Once loaded, it instructs the agent to classify all user input, immediately execute matching skills, compose multi-skill chains, and automatically trigger further skills. The proposed pre-hooks, post-hooks, and error hooks affect all skills rather than only the current explicitly authorized operation. This changes the agent's normal task-selection behavior and allows the router to expand a narrow user request into additional operations. Approval is mentioned only conditionally. General skill execution, event generation, notifications, recovery actions, learning actions, and decision-log modifications can occur without an explicit approval boundary ...[truncated 1131 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the statements that make the router the first gateway for all requests or require it to run on every request. 2. Activate orchestration only when the user explicitly requests skill routing or a multi-step workflow. 3. Generate a read-only execution plan that identifies every skill, argument, permission, data source, output, and external side effect before execution. 4. Require explicit approval for every additional skill introduced by routing or auto-chain evaluation. 5. Do not register global pre-hooks, post-hooks, or error hooks. Scope hooks to the current approved workflow and remove them when it finishes. 6. Disable automatic recovery, learning, notification, and decision-log changes unless separately authorized. 7. Enforce a capability policy outside the skill text so a skill cannot grant itself permission to execute other skills. 8. Bind execution to the user's original intent and reject chain expansion that is not necessary to fulfill that intent. ]]>
