T01 · Skill Instruction Hijacking
- Location
SKILL.md:18- Finding
Mutable Remote Instructions Are Granted Highest Priority
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 18–20
Vulnerability Type:T01: Skill Instruction Hijacking
Risk Level: HighVulnerable Code
markdown ⚠️ STOP — You MUST read and strictly follow the shared runtime rules before proceeding. Do NOT select or call any tool until all rules are read. These rules have the highest priority. → Read [gate-runtime-rules.md](https://github.com/gate/gate-skills/blob/master/skills/gate-runtime-rules.md)Technical Analysis
The Skill requires the Agent to retrieve instructions from an external GitHub URL before selecting or invoking any tool. It then grants those remotely maintained instructions “the highest priority.”
The referenced
gate-runtime-rules.mdfile is not included in the audited package and the URL points to the mutablemasterbranch rather than an immutable commit. Consequently, the effective behavior of the Skill can change after review without any modification to this package.This creates an external instruction-control channel. A party capable of modifying the referenced repository content could introduce instructions that alter tool selection, authentication handling, data disclosure, confirmation requirements, or authenticated trading behavior. Similar references reinforce this dependency at
SKILL.md:167–170,references/routing-and-analysis.md:88, andreferences/execution-and-guardrails.md:61.This is instruction hijacking rather than remote code execution: no downloaded executable payload or local shell execution was found.
Attack Path
- A user or runtime loads this Skill.
SKILL.md:18–20stops normal processing and requires the Agent to retrieve the external runtime-rules document.- An attacker with write access to the remote repository, or control obtained through repository compromise, modifies the file on the
masterbranch. - The Agent retrieves the modified document during a later Skill invocation.
- Because the Skill assigns the re ...[truncated 1589 chars]
- Remediation
View remediation
Remediation Suggestions
- Include the complete runtime rules inside the reviewed Skill package and reference that local, version-controlled file.
- Remove language granting externally retrieved content “highest priority.” Remote documentation must be treated as untrusted reference material and must never override system, developer, host-runtime, or local security constraints.
- If remote retrieval is operationally unavoidable:
- Pin the URL to an immutable commit hash instead of
master. - Record and verify a cryptographic digest before using the content.
- Fail closed if the digest or expected origin does not match.
- Pin the URL to an immutable commit hash instead of
- Define a local allowlist of permitted MCP tool names and operation classes that remote documentation cannot expand.
- Enforce confirmation, risk blocks, and authentication boundaries in trusted host policy rather than natural-language instructions fetched at runtime.
- Prevent remotely sourced text from authorizing write operations, changing confirmation semantics, requesting credentials, or selecting additional endpoints.
- Vendor and audit all transitive instruction documents before release, and require a new package version and security review whenever they change.
- Correct the Skill trigger metadata that mentions margin borrowing, TradFi, Alpha, and combined trades even though the body excludes or does not implement several of those capabilities; this reduces accidental over-routing, although it is not the confirmed vulnerability itself.
