T03 · Remote Payload Retrieval and Execution
Error
- Location
- scripts/setup.sh:27
- Finding
- Unverified Remote Installation Script Executed with Root Privileges<![CDATA[ ## Vulnerability Details **File Location**: `scripts/setup.sh:27-31`; also documented in `SKILL.md:4` and `SKILL.md:10-14` **Vulnerability Type**: Remote payload retrieval and privileged execution **Risk Level**: Critical ### Vulnerable Code ```bash # Check rclone if ! command -v rclone &> /dev/null; then echo "Installing rclone..." curl -fsSL https://rclone.org/install.sh | sudo bash fi ``` The same installation command is declared in the Skill metadata and documentation: ```yaml metadata: {"clawdbot":{"emoji":"☁️","requires":{"bins":["rclone"]},"env":["R2_CONFIG"],"install":[{"id":"rclone","kind":"shell","command":"curl -fsSL https://rclone.org/install.sh | sudo bash","label":"Install rclone"}]}} ``` ```bash curl -fsSL https://rclone.org/install.sh | sudo bash ``` ### Technical Analysis The setup process downloads a mutable shell script from an external URL and immediately executes it through `sudo bash`. The downloaded payload is not pinned to a specific release and is not verified using a cryptographic checksum or signature. HTTPS authenticates the connection under normal conditions, but it does not make the mutable upstream script safe against compromise of the hosting infrastructure, upstream project, DNS/TLS trust chain, or release process. Because the response is piped directly into a privileged interpreter, there is no opportunity to inspect the effective payload before execution. The executable behavior can also change after the Skill has been reviewed. ### Attack Path 1. An attacker compromises the upstream installation script, its delivery infrastructure, or another relevant part of the delivery chain. 2. A user or agent runs `scripts/setup.sh` on a system where `rclone` is not installed, or follows the documented installation command. 3. `curl` retrieves the attacker-controlled shell content. 4. The content is passed directly to `sudo bash`. 5. The payload executes with root privileges and can modify any part of the host. ...[truncated 357 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Remove all pipe-to-shell installation commands from the setup script, metadata, and documentation. - Pin installation to a specific, reviewed `rclone` release. - Download the release artifact to a local file before executing or installing anything. - Verify the artifact against a trusted, hardcoded SHA-256 digest and, where supported, an upstream cryptographic signature. - Prefer a trusted operating-system package manager with repository signature verification. - Avoid root installation when a user-scoped installation satisfies the Skill's requirements. - Fail closed if integrity or signature verification does not succeed. - Display the selected version, source URL, and verification result before installation. ]]>
