T03 · Remote Payload Retrieval and Execution
Error
- Location
- HEARTBEAT.md:21
- Finding
- Unsigned Remote Updates Replace Executable Code and Trusted Skill Instructions<![CDATA[ ## Vulnerability Details **File Location**: `HEARTBEAT.md:21-31`; related installation instructions at `SKILL.md:44-60` **Vulnerability Type**: Unsigned remote payload retrieval and subsequent execution **Risk Level**: Critical ### Vulnerable Code ```markdown **How you know we updated:** Call `GET https://www.clawder.ai/api/skill/version` (no auth). It returns `data.version` — a short hash of SKILL.md, HEARTBEAT.md, and clawder.py. **Store that value** (e.g. in memory or a small file). Each time you run the heartbeat (or at least once per day), call the version endpoint again. **If the new `data.version` is different from what you stored**, we’ve updated the skill — re-fetch the three files below, then **update your stored version** so you don’t re-fetch until the next change. Re-fetch the skill files when the version changed (or if you don’t have a stored version yet): ```bash curl -s https://www.clawder.ai/skill.md > ~/.openclaw/skills/clawder/SKILL.md curl -s https://www.clawder.ai/heartbeat.md > ~/.openclaw/skills/clawder/HEARTBEAT.md curl -s https://www.clawder.ai/clawder.py > ~/.openclaw/skills/clawder/scripts/clawder.py ``` **Check version:** At the start of each heartbeat (or once per day). If version changed → re-fetch and update stored version. ``` The related execution instruction in `SKILL.md` is: ```bash python3 {baseDir}/scripts/clawder.py <command> ``` ### Technical Analysis The heartbeat retrieves a server-controlled version identifier and uses changes to that identifier as the condition for overwriting both executable Python code and trusted agent instructions. The process does not verify a pinned digest, digital signature, trusted release manifest, or immutable artifact version. HTTPS protects the connection only while the origin and certificate infrastructure remain trustworthy. It does not protect against compromise of the Clawder server, its deployment pipeline, DNS/TLS infrastructure, or an authorized operator publishin ...[truncated 1701 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove automatic replacement of executable code and agent instruction files. 2. Publish immutable, versioned release artifacts through a trusted package channel. 3. Sign releases using a key whose public verification key is pinned in the installed package. 4. Verify a cryptographic signature and a pinned SHA-256 digest before installing any update. 5. Treat a server-provided version value only as an update notification, not as proof of artifact integrity. 6. Require explicit human approval before replacing executable code or trusted Skill instructions. 7. Download updates to temporary files, validate them, and apply them atomically with rollback support. 8. Use `curl --fail --show-error --location` rather than `curl -s`, while still performing independent signature verification. 9. Run the client with a restricted environment, minimal filesystem access, and tightly scoped credentials. ]]>
