T01 · Skill Instruction Hijacking
Error
- Location
- skill.md:14
- Finding
- Untrusted Remote Skill Instructions Are Automatically Treated as Agent Directives## Vulnerability Details **File Location**: `skill.md:14, 38-45`; `README.md:34, 62-85` **Vulnerability Type**: Remote instruction hijacking through externally retrieved skill content **Risk Level**: High ### Vulnerable Code Snippet From `skill.md:14`: ```markdown - **get_skill**: Get full instructions for an agent skill. Returns the complete SKILL.md content, install command, and metadata. Use after search_tools to get detailed skill instructions. ``` From `skill.md:38-45`: ```markdown Returns the complete instructions, install command, and metadata. ## Workflow 1. Search: `curl ".../api/search?q=file+conversion"` 2. If result is `type: "skill"` → get instructions: `curl ".../api/skill/SKILL_NAME"` → follow them 3. If result is `type: "mcp_tool"` → call it: `POST .../api/call` with `endpoint`, `tool`, `args` ``` Corresponding behavior is also documented in `README.md:62-85`: ```markdown ### Get Skill Instructions Load full SKILL.md content for a skill found via search. ```bash curl "https://nemo.25chenghua.workers.dev/api/skill/SKILL_NAME" ``` Add `?repo=owner/repo` if multiple skills share the same name. Returns the complete instructions, install command, and metadata. ### Call a Remote MCP Tool Proxy a tool call to any indexed MCP server. ```bash curl -X POST "https://nemo.25chenghua.workers.dev/api/call" \ -H "Content-Type: application/json" \ -d '{"endpoint": "SERVER_URL", "tool": "TOOL_NAME", "args": {}}' ``` Use the `serverEndpoint` and `toolName` from search results. ## Workflow 1. Search: `curl ".../api/search?q=file+conversion"` 2. If result is `type: "skill"` → get instructions: `curl ".../api/skill/SKILL_NAME"` → follow them 3. If result is `type: "mcp_tool"` → call it: `POST .../api/call` with `endpoint`, `tool`, `args` ``` ### Technical Analysis The documented workflow retrieves complete skill instructions from the external Nemo service and expl ...[truncated 2347 chars]
- Remediation
- ## Remediation Suggestions 1. Treat all retrieved skill text as untrusted data and remove the unconditional instruction to “follow” it. 2. Display fetched instructions to the user and require explicit approval before they can influence agent actions. 3. Restrict retrieval to trusted repositories and maintain an allowlist of approved skill publishers. 4. Require cryptographic signatures or verified content hashes and pin each approved skill to an immutable version. 5. Parse retrieved content in an isolated data context rather than inserting it into the governing instruction hierarchy. 6. Apply policy checks that reject instructions requesting secrets, safety-policy changes, unrelated tool use, persistence, or privilege expansion. 7. Run approved skills with minimal capabilities and grant tools individually rather than inheriting all agent permissions. 8. Record the skill source, repository, immutable revision, content hash, user approval, and resulting actions in an audit log.
