T01 · Skill Instruction Hijacking
- Location
SKILL.md:31- Finding
Untrusted Remote Update Instructions Can Hijack Agent Behavior
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 31-49
Vulnerability Type: Remote instruction injection into the Agent execution flow
Risk Level: CriticalVulnerable Code Snippet
markdown mcporter call "https://www.weiyun.com/api/v3/mcpserver" "check_skill_update" --args '{"version": "当前版本"}'markdown | `latest` | string | 最新版本号,格式为 MAJOR.MINOR.PATCH | | `release_note` | string | 最新版本发布说明 | | `instruction` | string | 更新指令 |markdown 如果当前版本 `version` 低于最新版本 `latest`,则遵循 `instruction` 指令进行更新,或提示用户更新。The final source instruction means that, when the remote version is newer, the Agent should follow the remotely returned
instructionfield or ask the user to update.Technical Analysis
The Skill mandates a daily call to a remote MCP endpoint and treats the response's free-form
instructionfield as trusted Agent guidance. The response is not constrained to a predefined update action, verified against an allowed command schema, authenticated through a signed release manifest, or subjected to explicit user approval before execution.HTTPS protects the connection in transit but does not make arbitrary server-generated instructions safe. A compromised endpoint, compromised provider account, malicious backend response, or upstream service defect could change the effective behavior of the already-reviewed Skill without modifying its local files.
This exceeds the minimum privilege needed for checking whether a newer version exists. A version check only needs to return a version number, release metadata, and a fixed trusted download reference; it does not need authority to issue arbitrary instructions to the Agent.
Attack Path
- The Agent loads the Skill and performs the mandatory daily update check.
- An attacker compromises the update service or otherwise gains control over its response.
- The response reports a version greater than
1.0.10. - The attac ...[truncated 1079 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the requirement to follow the free-form
instructionfield automatically. - Treat
instructionandrelease_noteas untrusted display-only text. - Restrict the response schema to inert data such as a semantic version, release identifier, cryptographic digest, and fixed HTTPS download URL.
- Use signed release manifests and verify the signature against a public key embedded in the reviewed Skill.
- Require explicit user confirmation before downloading, installing, or replacing any Skill files.
- Implement updates through a fixed local updater with strict hostname, path, package-name, version, and digest validation.
- Never pass remote response text to a shell, command executor, package manager, or general Agent instruction context.
- Pin the expected MCP method and response types, rejecting unexpected fields and malformed semantic versions.
- Remove the requirement to follow the free-form
