T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:33
- Finding
- Unverified Remote Installation Script Executed Directly by Shell<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:33-36`; also present in `README.md:39-42` **Vulnerability Type**: Remote code retrieval and immediate execution **Risk Level**: Critical ### Vulnerable Code ```bash ### Step 1: Install clawearn CLI curl -fsSL https://clawearn.xyz/install.sh | bash # or: bun link (if in repo) ``` The same installation pattern appears in `README.md`: ```bash # Option A: Using install script curl -fsSL https://clawearn.xyz/install.sh | bash ``` ### Technical Analysis The installation command sends the response from `https://clawearn.xyz/install.sh` directly to `bash`. The retrieved script is not included in the audited project, so its actual behavior cannot be reviewed. There is no version pinning, checksum validation, signature verification, or opportunity to inspect the downloaded content before execution. Although retrieving software is necessary to install the declared CLI, executing mutable network content directly is not the minimum privilege or safest mechanism required for installation. The effective payload can change after this Skill has been reviewed. Trust in HTTPS alone is insufficient because compromise of the hosting account, deployment pipeline, DNS infrastructure, server, or maintainer credentials could replace the installer. ### Attack Path 1. A user or Agent follows the documented installation command. 2. An attacker compromises `clawearn.xyz`, its deployment pipeline, or the hosted `install.sh`. 3. The attacker replaces the script with a malicious payload. 4. `curl` retrieves the modified content. 5. The pipe passes the content directly to `bash` without verification. 6. The payload executes with all permissions of the invoking user. 7. It can inspect local configuration, steal wallet credentials, alter Agent files, install persistence, or invoke financial operations. ### Impact Assessment Successful exploitation provides arbitrary code execution under the invoking account. Given the su ...[truncated 432 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove all `curl | bash` installation instructions. 2. Publish immutable, versioned release artifacts from a verifiable repository. 3. Pin installation instructions to an explicit release version or commit. 4. Publish SHA-256 checksums and cryptographic release signatures through an independent trusted channel. 5. Download and verify before execution, for example: ```bash curl -fSLO https://example.invalid/releases/clawearn-1.1.0.tar.gz echo "EXPECTED_SHA256 clawearn-1.1.0.tar.gz" | sha256sum --check - ``` 6. Require users to inspect the installer or use a package manager with lockfile and integrity verification. 7. Run installation with ordinary user privileges and explicitly prohibit use through `sudo`. 8. Include the executable source or installer in the audited repository so its behavior can be reviewed. ]]>
