T01 · Skill Instruction Hijacking
- Location
SKILL.md:14- Finding
External Mutable Instructions Are Assigned Highest Priority
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 14–17
Vulnerability Type: External instruction takeover
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 [`exchange-runtime-rules.md`](../exchange-runtime-rules.md) first (mirror: [`exchange-runtime-rules.md` on GitHub](https://github.com/gate/gate-skills/blob/master/skills/exchange-runtime-rules.md)). - **Only call MCP tools explicitly listed in this skill** (see **MCP tools** below: Auto-Invest Related Tools and Supporting Tools). Tools not documented here must NOT be called, even if they exist in the MCP server.Technical Analysis
The skill requires the agent to load another instruction document before selecting or invoking tools and assigns that document the “highest priority.” The referenced local file,
../exchange-runtime-rules.md, is outside the audited project and was not present in the supplied directory structure. The skill also provides a mutable GitHubmasterbranch URL as a mirror.Consequently, the effective behavior of the skill is not fully defined by the reviewed package. Instructions retrieved from the external location can change after audit without changing this project. Assigning those unseen instructions elevated priority creates an instruction-hijacking boundary: whoever controls the referenced repository, branch, delivery channel, or fetched content may influence the agent’s goals, safeguards, data handling, and tool-use decisions.
Although the visible package limits calls to named Gate MCP tools and requires confirmation for financial writes, those local safeguards cannot reliably constrain an external document that is explicitly described as having the highest priority.
Attack Path
- A user loads or invokes the auto-invest skill.
- Lines 14–17 instruct t ...[truncated 1790 chars]
- Remediation
View remediation
Remediation Suggestions
- Bundle
exchange-runtime-rules.mdinside the audited skill package so its complete contents are reviewed and versioned together with the skill. - Replace the parent-directory reference with a package-relative path that cannot silently resolve to an unaudited file.
- Remove language assigning “highest priority” to externally loaded content. State that referenced documentation must remain subordinate to platform, system, developer, and package-local security constraints.
- Do not use a mutable branch URL as an authoritative instruction source. If an external reference is necessary:
- Pin it to an immutable commit.
- Verify its expected cryptographic hash.
- Fail closed if retrieval or verification fails.
- Treat retrieved content as untrusted documentation rather than executable agent instructions.
- Define all critical controls locally, including the allowed-tool list, explicit confirmation requirements, stale-confirmation invalidation, amount and balance validation, and one-call top-up restriction.
- Add a policy stating that missing runtime rules must stop the workflow rather than trigger automatic fallback to mutable remote instructions.
- Include the pinned runtime-rules file and its integrity metadata in future security reviews and release artifacts.
- Bundle
