T01 · Skill Instruction Hijacking
Error
- Location
- SKILL.md:216
- Finding
- Untrusted Skill Instructions Are Executed Without an Isolation Boundary<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 216-223 **Vulnerability Type**: Untrusted instruction execution **Risk Level**: High ### Vulnerable Code ```text **Single-model mode** (default): Spawn two subagents simultaneously on the same execution model: **With-skill subagent:** ``` [Model: <execution_model>] Read the skill at <skill-path>/SKILL.md and follow its instructions. Task: <prompt> Save all outputs to: <workspace>/iteration-<N>/<test-name>/with_skill/outputs/ ``` ``` ### Technical Analysis The evaluated `SKILL.md` is untrusted input, but the evaluation subagent is explicitly instructed to read and follow it. The workflow does not establish an instruction hierarchy that prevents the evaluated Skill from overriding evaluation goals, requesting unrelated actions, or influencing safety constraints. No sandbox, network restriction, filesystem allowlist, tool allowlist, credential isolation, or output-path enforcement is specified. Consequently, a malicious Skill can embed instructions directing the subagent to access files, invoke available tools, transmit information, modify evaluation artifacts, or falsify results. The effective impact depends on the tools and permissions granted to the spawned subagent. The document does not itself prove that privileged tools are always available, but it fails to constrain any capabilities that are available. ### Attack Path 1. An attacker publishes or supplies a malicious Skill for evaluation. 2. The evaluation engine loads the attacker's `SKILL.md`. 3. The with-Skill subagent receives the instruction to follow that file. 4. Embedded instructions redirect the subagent from the intended evaluation task. 5. The subagent uses any available filesystem, command, or network capabilities to perform attacker-selected actions. 6. The malicious Skill may additionally direct the subagent to manipulate output files so the behavior appears legitimate or receives a favorable grade. ### Impact As ...[truncated 626 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Treat every evaluated Skill as hostile data rather than trusted governing instructions. 2. Run each evaluation in a disposable sandbox or isolated container. 3. Disable network access by default and permit only explicitly approved destinations when network access is essential to the test. 4. Expose only a strict allowlist of tools required for the individual test case. 5. Mount the target Skill and test fixtures read-only. 6. Restrict writes to a newly created per-run output directory and verify the resolved path before every write. 7. Remove credentials, SSH agents, cloud metadata access, API tokens, and unrelated environment variables from the subagent environment. 8. Add immutable higher-priority instructions stating that the target Skill cannot change the evaluator's security constraints, tool policy, output destination, or test objective. 9. Reject or manually review Skills that request sensitive-file access, unrelated command execution, credential use, persistence, or external communication. 10. Independently validate generated artifacts rather than trusting claims made by the evaluated Skill. ]]>
