T01 · Skill Instruction Hijacking
- Location
SKILL.md:10- Finding
Unaudited External File Is Treated as Authoritative Skill Instructions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 10
Vulnerability Type:T01: Skill Instruction Hijacking
Risk Level: MediumVulnerable Code Snippet:
markdown If this skill is being used from inside the `CLI-Anything` repository, read `../cli-anything-plugin/HARNESS.md` before implementation. That file is the full methodology source of truth. If it is not available, follow the condensed rules below.Technical Analysis
The skill instructs the agent to read a file outside the audited skill directory and treat its contents as the “full methodology source of truth.” The referenced file is not included in this package, so its integrity, provenance, and contents cannot be verified during this audit.
This creates an instruction-trust boundary vulnerability. An attacker who controls the surrounding repository or can create or modify
../cli-anything-plugin/HARNESS.mdcan place arbitrary instructions in that file. Because the skill explicitly assigns the external document authoritative status, the agent may interpret attacker-controlled repository content as operational instructions rather than untrusted input.The behavior is conditional: exploitation requires the skill to run from a directory layout where the referenced relative path exists and is attacker-controlled. The reviewed files do not themselves contain an active malicious payload.
Attack Path
- An attacker controls or modifies the repository environment in which the skill is invoked.
- The attacker creates or alters
../cli-anything-plugin/HARNESS.mdrelative to the skill’s working location. - The attacker inserts instructions requesting unrelated command execution, sensitive-file access, unsafe installation, source modification, or disclosure of collected information.
- A user invokes this skill from inside the expected
CLI-Anythingrepository context. - Following
SKILL.md, the agent reads the attacker-controlled fil ...[truncated 1213 chars]
- Remediation
View remediation
Remediation Suggestions
- Bundle the complete methodology inside the audited skill package instead of delegating authority to a file outside the package.
- If an external document is necessary, retrieve it only from a trusted, pinned revision and verify its cryptographic hash or signature before use.
- Remove language declaring repository-controlled content to be an unrestricted “source of truth.”
- Explicitly state that external files are untrusted reference data and cannot override system, developer, user, or skill-level security constraints.
- Restrict accepted external instructions to a defined schema or a narrow set of methodology fields rather than interpreting arbitrary Markdown as commands.
- Resolve and validate the canonical path before reading it, rejecting symlinks and paths outside an approved repository root.
- Require explicit user confirmation before executing commands, installing packages, invoking target backends, or accessing sensitive paths based on externally loaded content.
- Record the external file’s resolved path and verified revision or digest in the final report to support review and reproducibility.
