T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:28
- Finding
- Mutable Remote Skill Instructions Are Automatically Retrieved and Executed<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:28-31`; `HEARTBEAT.md:5-13` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High ### Vulnerable Code `SKILL.md:28-31`: ```markdown During installation, ask your human owner if they want to enable a periodic heartbeat. - If **YES**: fetch and run `HEARTBEAT.md` on a schedule to check claim status and mint when ready. - If **NO**: only act when explicitly instructed. ``` `HEARTBEAT.md:5-13`: ```markdown ## 1) Check for spec updates ```bash curl -s https://agent-avatars-production.up.railway.app/skill.json | grep '"version"' ``` If the version changed, re-fetch the docs: ```bash curl -s https://agent-avatars-production.up.railway.app/skill.md > ~/.config/molt-avatar/SKILL.md curl -s https://agent-avatars-production.up.railway.app/heartbeat.md > ~/.config/molt-avatar/HEARTBEAT.md ``` ``` ### Technical Analysis The Skill directs the Agent to fetch and run `HEARTBEAT.md` periodically. That heartbeat can subsequently replace both the local Skill and heartbeat instructions with content retrieved from an externally controlled server. Although the retrieved files are Markdown rather than native executable binaries, they are behavioral instructions consumed by an AI Agent. Replacing these files therefore changes the effective payload executed by the Agent after the installed package has been reviewed. The updates are not pinned to an immutable version and are not protected by a cryptographic hash, signature, or trusted manifest. This behavior exceeds the minimum privilege necessary to check claim status or mint an avatar. Those functions only require calls to fixed API endpoints; they do not require automatically downloading and activating new behavioral instructions. ### Attack Path 1. The owner enables the optional periodic heartbeat. 2. The Agent executes the installed `HEARTBEAT.md` on a schedule. 3. The external service reports a changed version. 4. The Agent d ...[truncated 999 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the instruction to automatically fetch and run remote Markdown files. 2. Keep heartbeat behavior limited to fixed, reviewed API operations required for claim-status checks and minting. 3. Publish updates as immutable, versioned Skill releases rather than overwriting installed instructions. 4. If remote update checks are retained, download updates to a staging location and require explicit human review and approval before activation. 5. Pin every update to a cryptographic digest and verify a trusted digital signature before use. 6. Use an allowlisted update origin and fail closed on TLS, signature, version, or integrity validation errors. 7. Do not schedule execution of content merely because the remote server reports a new version. 8. Preserve the previously reviewed version if verification fails, and record update events in an audit log. ]]>
