T01 · Skill Instruction Hijacking
- Location
templates/AGENTS.md:5- Finding
Untrusted Bootstrap File Can Hijack Agent Instructions
- Content
View full analysis
Vulnerability Details
File Location:
templates/AGENTS.md:5-7
Vulnerability Type: Untrusted instruction execution and evidence deletion
Risk Level: HighVulnerable Code Snippet
markdown ## First Run If `BOOTSTRAP.md` exists, that's your birth certificate. Follow it, figure out who you are, then delete it. You won't need it again.Technical Analysis
The template directs the agent to treat any workspace-level
BOOTSTRAP.mdfile as authoritative, follow its instructions, and then delete it. It does not require:- Verification of the file's provenance or integrity.
- Inspection or approval by the user.
- Restriction of the tools or data available while processing it.
- Confirmation that higher-priority safety constraints take precedence.
- Preservation of the file for subsequent investigation.
Consequently, any party capable of creating or modifying
BOOTSTRAP.mdcan inject instructions that alter the agent's initial goals or request tool operations. Automatic deletion also removes the original instruction source, reducing auditability.This issue does not itself grant filesystem access to a remote attacker. Exploitation requires an attacker, compromised process, malicious package, or other actor to already have the ability to place or modify a file in the agent workspace.
Attack Path
- An attacker or compromised component obtains write access to the agent workspace.
- The attacker creates a malicious
BOOTSTRAP.md. - The file instructs the agent to disclose workspace information, change behavioral constraints, invoke available tools, or perform another unauthorized action.
- The agent starts and automatically treats the file as authoritative.
- The agent follows the injected instructions using whatever tools and permissions are available in its runtime.
- The agent deletes
BOOTSTRAP.md, removing the primary source of the malicious instructions.
Impact Asse
...[truncated 421 chars]
- Remediation
View remediation
Remediation Suggestions
- Treat
BOOTSTRAP.mdas untrusted input rather than authoritative instructions. - Display its contents and require explicit user approval before applying any behavior-changing directive.
- State that platform policies, safety requirements, and current user instructions always take precedence.
- Parse bootstrap content through a strict allowlist of declarative configuration fields instead of executing free-form instructions.
- Do not permit bootstrap content to authorize network operations, secret access, destructive commands, or changes to safety controls.
- Do not delete the file automatically. Archive it with integrity metadata or require explicit approval before removal.
- Restrict workspace write access and validate the file's owner, permissions, expected path, and cryptographic digest where practical.
- Treat
