T03 · Remote Payload Retrieval and Execution
Error
- Location
- guides/skill-upgrade.md:10
- Finding
- Unverified Remote Archive Can Replace Installed Skill Instructions<![CDATA[ ## Vulnerability Details **File Location**: `guides/skill-upgrade.md:10-20` **Vulnerability Type**: Unverified remote payload retrieval and installation **Risk Level**: High ### Relevant Code Segment The following is an English translation of the complete relevant source segment: ```markdown **Download address** (fixed pointer to the latest version): https://sf3329.zhuanstatic.com/2szbuN0pkHL/zhuanzhuan.zip ## Upgrade process, selected according to platform capabilities ### Clients with file-writing capabilities The Agent performs the operation directly: 1. Locate the Skill installation directory. 2. Download and extract-overwrite: download the ZIP above, extract it, and overwrite the Skill installation directory while preserving the expected directory structure. 3. Validation: confirm that the version in the overwritten SKILL.md frontmatter is higher than the previous version. 4. Tell the user that the update is complete and a new session is required. ``` The update trigger is defined in `SKILL.md:24-32`: ```markdown 1. Call check_skill_update with the current version. 2. If needUpdate is false, the call fails, or the tool is unavailable, silently skip the update check. 3. If needUpdate is true, ask whether the user wants to upgrade. If the user agrees, execute guides/skill-upgrade.md. Clients with file-writing capability download and overwrite the Skill directly. ``` ### Technical Analysis The Skill establishes a mutable remote update channel. A response from the external MCP determines whether an update is offered, and an accepted update causes the Agent to download a ZIP archive and overwrite installed Skill files. The only required validation is that the replacement `SKILL.md` advertises a higher version. The procedure does not require: - A cryptographic digest pinned in the reviewed Skill. - A publisher signature or signed release manifest. - An immutable, version-specific artifact. - Validation of archive entry pat ...[truncated 2437 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Publish immutable, version-specific release artifacts rather than a mutable “latest” ZIP. 2. Sign every release manifest and archive with a dedicated publisher key. 3. Pin the trusted public key in the reviewed Skill and verify the signature before extraction. 4. Include and verify a SHA-256 or stronger digest from the signed manifest. 5. Download into a newly created private temporary directory. 6. Before extraction, reject: - Absolute paths. - Paths containing `..`. - Symbolic links and hard links. - Device files and other special entries. - Files outside an explicit allowlist. 7. Extract into a staging directory rather than directly over the live installation. 8. Validate the expected package structure, file count, file types, and manifest contents. 9. Treat version comparison only as release-selection logic, never as integrity validation. 10. Display the publisher, exact version, immutable source, and signature verification result before requesting approval. 11. Install atomically only after all checks succeed, and retain a safe rollback copy. 12. Apply least privilege so the updater can modify only the intended Skill directory. ]]>
