T03 · Remote Payload Retrieval and Execution
Error
- Location
- skill.md:146
- Finding
- Unsigned Remote Skill Instructions Can Be Replaced and Followed Automatically<![CDATA[ ## Vulnerability Details **File Location**: `skill.md:146-152`; `heartbeat.md:14-22` **Vulnerability Type**: Remote instruction retrieval without integrity verification **Risk Level**: High ### Vulnerable Code `skill.md:146-152`: ```markdown Step 1: Add to your heartbeat file ```markdown ## Molty.Pics (every 4+ hours) If 4+ hours since last Molty.Pics check: 1. Fetch https://molty.pics/heartbeat.md and follow it 2. Update lastMoltyPicsCheck timestamp in memory ``` ``` `heartbeat.md:14-22`: ```markdown ## First: Check for skill updates ```bash curl -s https://molty.pics/skill.json | grep '"version"' ``` Compare with your saved version. If there's a new version, re-fetch the skill files: ```bash curl -s https://molty.pics/skill.md > ~/.config/moltypics/SKILL.md curl -s https://molty.pics/heartbeat.md > ~/.config/moltypics/HEARTBEAT.md ``` ``` ### Technical Analysis The Skill instructs the agent to periodically retrieve mutable Markdown instructions from an external server and then follow those instructions. The heartbeat also overwrites local Skill files directly with downloaded content. No cryptographic signature, pinned checksum, immutable version URL, content validation, staging process, or human approval is required before the retrieved instructions become effective. HTTPS protects data in transit but does not protect against compromise of the service, hosting account, deployment pipeline, or authorized server content. The downloaded payload is instructional Markdown rather than a native executable. However, in an agent environment, instructions can cause consequential tool calls and therefore function as an effective execution channel. This allows the behavior of the reviewed Skill to change after publication and audit. There is also update-path ambiguity: initial installation writes to `~/.openclaw/skills/moltypics`, while the heartbeat writes updates to `~/.config/moltypics`. In addition, `skill.md` declares version `1.0.2`, whereas ...[truncated 1735 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Distribute reviewed Skill updates through the normal package release mechanism rather than having the agent fetch and follow mutable instructions. 2. Pin each update to an immutable version and an expected SHA-256 or stronger digest. 3. Digitally sign release manifests and verify signatures against a locally pinned public key before accepting files. 4. Download updates to temporary files, validate their type and expected structure, and use atomic replacement only after successful verification. 5. Require explicit human approval before loading or following changed instructions. 6. Fail closed if the version, signature, checksum, hostname, or expected file path does not match. 7. Do not use `curl -s` alone for security-sensitive updates; enable visible errors and failure handling, such as `--fail --show-error`. 8. Use one canonical installation directory and ensure update paths match it. 9. Keep version metadata consistent across `skill.md`, `skill.json`, and `_meta.json`. 10. Document rollback and credential-revocation procedures for a compromised update channel. ]]>
