T01 · Skill Instruction Hijacking
Warning
- Location
- SKILL.md:79
- Finding
- Untrusted Project Files and Agent Mail Can Redirect Agent Behavior## Vulnerability Details **File Location**: `SKILL.md`, lines 79-85 **Vulnerability Type**: T01: Skill Instruction Hijacking **Risk Level**: Medium ### Vulnerable Code Snippet ```text First read ALL of the AGENTS dot md file and README dot md file super carefully and understand ALL of both! Then use your code investigation agent mode to fully understand the code, and technical architecture and purpose of the project. Then register with MCP Agent Mail and introduce yourself to the other agents. Be sure to check your agent mail and to promptly respond if needed to any messages; then proceed meticulously with your next assigned beads, working on the tasks systematically and meticulously and tracking your progress via beads and agent mail messages. Don't get stuck in "communication purgatory" where nothing is getting done; be proactive about starting tasks that need to be done, but inform your fellow agents via messages when you do so and mark beads appropriately. When you're not sure what to do next, use the bv tool mentioned in AGENTS dot md to prioritize the best beads to work on next; pick the next one that you can usefully work on and get started. Make sure to acknowledge all communication requests from other agents and that you are aware of all active agents and their names. Use ultrathink. ``` ### Technical Analysis The workflow directs agents to treat project-controlled `AGENTS.md` and `README.md` content, task selections returned by `bv`, and Agent Mail messages as operational instructions. It does not establish a trust boundary, require instruction provenance validation, restrict permitted actions, or state that external content must be treated only as untrusted data. Consequently, an attacker who can modify one of the referenced project documents, manipulate the task graph, or send messages through Agent Mail can introduce instructions that redirect an agent away from its approved task. The risk is increased by the explic ...[truncated 1706 chars]
- Remediation
- ## Remediation Suggestions - Explicitly classify repository documents, task descriptions, tool output, and Agent Mail messages as untrusted data rather than higher-priority instructions. - Define a fixed action policy in the skill that cannot be overridden by project files or messages. - Require agents to reject requests that conflict with the original user-approved task, security policy, or declared repository scope. - Authenticate Agent Mail participants and enforce per-project authorization and message provenance. - Allow only approved senders to assign work; ordinary messages should be informational and must not authorize tool execution. - Sanitize and validate task fields before presenting them to agents, especially fields capable of containing free-form instructions. - Require explicit human approval before sensitive operations such as reading secrets, changing access controls, executing unfamiliar scripts, accessing external networks, or publishing repository changes. - Add audit logging that records the source instruction responsible for every sensitive tool call. - After context compaction, restore the trusted task and security policy from a protected source instead of relying solely on mutable `AGENTS.md`.
