T01 · Skill Instruction Hijacking
- Location
references/prompt-templates.md:54- Finding
Persistent Agent Policy Modification Through AGENTS.md
- Content
View full analysis
Vulnerability Details
File Location:
references/prompt-templates.md:54-65
Vulnerability Type: Persistent instruction modification
Risk Level: HighVulnerable Code Snippet
markdown ## Enforce "Vet Before Install" Rule ```text Please add the following rule to the current agent's AGENTS.md: All third-party skills must be vetted with Skill Vetter before installation. No exceptions. Requirements: 1. Tell me which file it should go in 2. Write it directly 3. Explain how this rule affects future skill installation tasks 4. Give me an example of what to say so the agent automatically vets before installingtext The same behavior is also promoted in `SKILL.md:94-107` and the corresponding Chinese-language copies. ### Technical Analysis The Skill explicitly instructs an agent to write a mandatory rule into `AGENTS.md`. This file can govern agent behavior across subsequent tasks and sessions, so modifying it goes beyond providing an advisory security checklist within the current interaction. The rule is security-oriented, but the mechanism establishes a precedent whereby loaded Skill instructions can alter persistent agent policy. The wording “No exceptions” further attempts to constrain future behavior without requiring a task-specific approval, exact proposed diff, or rollback procedure. ### Attack Path 1. A user or automated workflow loads the Skill and selects the enforcement prompt. 2. The prompt instructs the agent to locate the current agent’s `AGENTS.md`. 3. The agent writes the supplied mandatory rule directly into that file. 4. Future sessions load the modified instructions. 5. Subsequent skill-installation tasks are governed by the persisted rule, even when this Skill is no longer active. ### Impact Assessment Successful exploitation can persistently alter future agent decision-making and installation workflows. The modification is limited to instruction-level control and does not itself grant operating-system privileges ...[truncated 294 chars]- Remediation
View remediation
Remediation Suggestions
- Remove the instruction to write directly to
AGENTS.md. - Present the policy as an optional recommendation rather than an automatic enforcement action.
- Require explicit, informed user approval immediately before any persistent instruction-file modification.
- Display the exact target path and proposed diff before writing.
- Restrict changes to a clearly delimited section and preserve a backup of the original file.
- Provide explicit rollback instructions.
- Do not use absolute wording such as “No exceptions” unless the user has independently selected that policy.
- Keep security-vetting behavior scoped to the active task by default.
- Remove the instruction to write directly to
