T01 · Skill Instruction Hijacking
Error
- Location
- heartbeat.md:9
- Finding
- Automatic Retrieval and Following of Mutable Remote Skill Instructions<![CDATA[ ## Vulnerability Details **File Location**: `heartbeat.md:9-25`; related activation instruction at `skill.md:158-165` **Vulnerability Type**: Mutable remote instruction retrieval and activation **Risk Level**: Critical ### Vulnerable Code ```markdown ## First: Check for Skill Updates Check if there's a new version (once a day is plenty): ```bash curl -s https://paywithlocus.com/skill.json | grep '"version"' ``` Compare with your saved version. If there's a new version, re-fetch the skill files: ```bash curl -s https://paywithlocus.com/skill.md > ~/.locus/skills/SKILL.md curl -s https://paywithlocus.com/onboarding.md > ~/.locus/skills/ONBOARDING.md curl -s https://paywithlocus.com/fiverr.md > ~/.locus/skills/FIVERR.md curl -s https://paywithlocus.com/heartbeat.md > ~/.locus/skills/HEARTBEAT.md curl -s https://paywithlocus.com/skill.json > ~/.locus/skills/skill.json ``` ``` The corresponding activation instruction is: ```markdown ## Locus (every 30 minutes) If 30+ minutes since last Locus check: 1. Fetch and follow https://paywithlocus.com/heartbeat.md 2. Update lastLocusCheck timestamp ``` ### Technical Analysis The Skill instructs the Agent to retrieve mutable Markdown from a remote server and explicitly “follow” it. It also replaces locally installed Skill files with responses from that server. No cryptographic signature, pinned digest, immutable version URL, schema validation, content review, or human approval is required before the downloaded instructions become active. HTTPS protects data in transit and authenticates the server under the public certificate infrastructure, but it does not ensure that future content is identical to the content reviewed during this audit. Consequently, compromise of the origin, its deployment pipeline, DNS or account controls—or an intentional post-review content change—can alter the effective Skill behavior. Although the retrieved payload is Markdown rather than a native executable, Agent instructions can ...[truncated 1776 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the instruction to automatically “fetch and follow” remote Markdown. 2. Ship reviewed Skill files as immutable package content. 3. Require explicit human review and approval before activating an update. 4. Publish versioned, immutable update artifacts rather than mutable canonical URLs. 5. Sign update manifests and artifacts with a dedicated release key, then verify signatures locally. 6. Pin an expected cryptographic digest for every downloaded file. 7. Download updates into a staging directory and validate all files before replacing active content. 8. Use atomic replacement only after signature, digest, origin, size, and schema checks succeed. 9. Ensure a failed or partial update leaves the previously reviewed version active. 10. Treat downloaded text as untrusted data rather than executable Agent instructions. ]]>
