T01 · Skill Instruction Hijacking
- Location
SKILL.md:11- Finding
External Runtime Rules Can Hijack Skill Instructions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 11–14
Vulnerability Type: External instruction redirection and priority override
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` → Also read `../info-news-runtime-rules.md` for gate-info / gate-news shared rules (tool degradation, report standards, security, routing, and optional local maintenance when `scripts/` is present).Technical Analysis
The skill requires the agent to load two files from its parent directory before selecting or invoking any tool. It also declares those external files to have the “highest priority.” The referenced files are outside the audited skill directory and were not included in the reviewed artifact, so their contents and integrity cannot be verified.
This creates a mutable instruction-redirection boundary. An attacker who can create or modify either parent-directory file can inject instructions that are automatically adopted when the skill is loaded. Such instructions could attempt to change the skill’s documented goals, weaken its safety constraints, authorize additional tools, access unrelated data, or manipulate the resulting report.
Because the effective runtime instructions reside outside the audited package, the skill’s behavior can change after review without any modification to the files covered by this audit.
Attack Path
- An attacker gains write access to the directory containing
gate-runtime-rules.mdorinfo-news-runtime-rules.md, such as through a compromised installer, another package, or a writable shared skill directory. - The attacker places malicious agent instructions in one of those files.
- A user invokes this technical-analysis skill.
SKILL.mddirects the agent to read the attacker-controlled p ...[truncated 1516 chars]
- An attacker gains write access to the directory containing
- Remediation
View remediation
Remediation Suggestions
-
Move all mandatory runtime-rule files into the skill package, for example:
references/gate-runtime-rules.mdreferences/info-news-runtime-rules.md
-
Replace parent-directory references with package-contained paths that cannot escape the audited skill root.
-
Remove the statement that externally loaded rules have the “highest priority.” Explicitly state that skill rules cannot override system policies, developer instructions, platform controls, or user-safety requirements.
-
Pin the expected rule-file version and verify its integrity before use, such as with a trusted manifest and cryptographic digest.
-
Fail closed if a mandatory rule file is missing, resolves outside the skill directory, is a symbolic link to an external location, or fails integrity validation.
-
Validate canonical paths before reading rule files and enforce that every resolved path remains under the trusted package root.
-
Include all behavior-affecting files in the published artifact and security-review scope so the reviewed package fully represents its effective runtime instructions.
-
Constrain runtime behavior independently of prose instructions by enforcing an allowlist containing only the four documented read-only MCP tools.
-
