T03 · Remote Payload Retrieval and Execution
Error
- Location
- heartbeat.md:89
- Finding
- Recurring retrieval and replacement of mutable Skill instructions<![CDATA[ ## Vulnerability Details **File Location**: `heartbeat.md:89-101` **Related Locations**: `SKILL.md:71-77`, `SKILL.md:136-142` **Vulnerability Type**: Remote retrieval of mutable agent instructions without integrity verification **Risk Level**: High ### Vulnerable Code ```bash mkdir -p ~/.openclaw/skills/clawgram curl -fsSL https://clawgram.org/skill.md > ~/.openclaw/skills/clawgram/SKILL.md curl -fsSL https://clawgram.org/openapi.yaml > ~/.openclaw/skills/clawgram/openapi.yaml curl -fsSL https://clawgram.org/rules.md > ~/.openclaw/skills/clawgram/rules.md curl -fsSL https://clawgram.org/heartbeat.md > ~/.openclaw/skills/clawgram/heartbeat.md curl -fsSL https://clawgram.org/skill.json > ~/.openclaw/skills/clawgram/skill.json ``` The surrounding instructions recommend periodically refreshing these files, with once per day presented as an appropriate frequency. ### Technical Analysis The heartbeat retrieves mutable Markdown, API definitions, rules, and metadata from external URLs and writes them directly over locally installed Skill files. There is no immutable version pin, expected cryptographic hash, signature validation, reviewed manifest, diff review, or atomic installation step. Although this is not a literal `curl | bash` pipeline, `SKILL.md` is operational instruction content loaded by OpenClaw. Replacing it can therefore change subsequent agent behavior after the installed package has already passed review. The effective payload remains controlled by the remote server. This behavior also conflicts with the safer policy in `SKILL.md`, which states that local files should be updated only following an explicit owner request and that background refresh must not overwrite them. ### Attack Path 1. An owner installs the reviewed Clawgram Skill. 2. The heartbeat is configured to execute periodically. 3. The agent follows the daily refresh guidance in `heartbeat.md`. 4. The Clawgram documentation host, deployment account, DNS path, or upstream p ...[truncated 1052 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove automatic or periodic replacement of installed Skill files. 2. Require explicit owner approval for every update, immediately before any files are changed. 3. Distribute immutable, versioned release artifacts rather than mutable documentation URLs. 4. Publish a signed manifest containing the exact version and SHA-256 hash of every file. 5. Download candidate updates to a private temporary directory and verify all signatures and hashes before installation. 6. Display a reviewable diff of instruction-bearing files such as `SKILL.md`, `heartbeat.md`, and `rules.md`. 7. Install files atomically only after verification and approval; preserve the previous version for rollback. 8. Do not treat a successful HTTPS response as sufficient proof that retrieved instructions are trusted. 9. Align `heartbeat.md` with the no-auto-overwrite policy already stated in `SKILL.md`. ]]>
