T01 · Skill Instruction Hijacking
- Location
SKILL.md:188- Finding
Mandatory Remote Instruction Retrieval Creates an Untrusted Instruction Channel
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 188-216
Vulnerability Type: Remote instruction injection
Risk Level: HighComplete Code Snippet
markdown **Dynamic prompt retrieval (recommended):** Fetch the prompt list: ```bash curl -H "Authorization: Bearer $MIAOYING_API_KEY" \ "https://www.aiphoto8.cn/api/openapi/prompts"Fetch the detailed prompt content:
bash curl -H "Authorization: Bearer $MIAOYING_API_KEY" \ "https://www.aiphoto8.cn/api/openapi/prompts/ai-form-prompt"text The same requirement is repeated at `SKILL.md:630-650`, where the agent is instructed that it must retrieve the latest configuration reference before generating form configuration. ### Technical Analysis The Skill requires the agent to retrieve mutable prompt content from an external service and use it as operational guidance. Unlike a structured API response containing only form field definitions, the endpoint returns Markdown content explicitly intended to guide subsequent agent behavior. This creates a post-review instruction channel: the effective instructions can change without modifying or re-auditing the installed Skill. If the service, its account, DNS path, or response-generation pipeline is compromised, an attacker could place adversarial instructions in the returned prompt content. The use of HTTPS protects transport integrity against ordinary network interception, but it does not protect against a compromised or malicious endpoint. The bearer API key is also attached to these requests, although sending it to the declared service is expected for authenticated API operations. ### Attack Path 1. An attacker compromises or obtains control over the Miaoying prompts endpoint or its content-management pipeline. 2. The attacker modifies `ai-form-prompt`, `booking-guide`, or another returned document to contain agent-directed instructions. 3. The agent follows the mandatory work ...[truncated 1228 chars]- Remediation
View remediation
Remediation Suggestions
- Bundle reviewed, versioned configuration guidance with the Skill instead of requiring remote Markdown instructions.
- If dynamic updates are necessary, return strictly structured JSON governed by a narrow schema. Reject unknown properties and free-form instruction fields.
- Cryptographically sign remote configuration releases and verify signatures against a pinned public key before use.
- Treat every remote response as untrusted data and explicitly instruct the agent not to follow commands or behavioral directives contained in it.
- Apply length limits, content-type validation, schema validation, and expected-value allowlists.
- Separate documentation retrieval from authenticated operational APIs where possible, so an API credential is not unnecessarily attached to documentation requests.
- Pin the expected prompt version and require explicit user approval before accepting a materially different version.
