T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:34
- Finding
- Unverified Remote Installation Script Executed Directly by Shell## Vulnerability Details **File Location**: `SKILL.md`, line 34 **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High **Vulnerable Code**: ```bash # On a fresh VPS curl -fsSL https://openclaw.ai/install.sh | bash cd / && tar xzf openclaw-full-backup-YYYY-MM-DD.tar.gz openclaw gateway start ``` ### Technical Analysis The restore instructions pipe a remotely downloaded script directly into `bash`. The effective executable payload is controlled by the content currently served from `https://openclaw.ai/install.sh`, rather than by code contained and reviewed within this project. No immutable version, cryptographic signature, or expected checksum is specified. The command also gives the user no opportunity to inspect the downloaded file before execution. HTTPS protects the connection in transit but does not protect against compromise of the domain, DNS infrastructure, hosting account, release pipeline, or remote script itself. Executing this installer is not required merely to extract the backup archive. Therefore, direct execution of mutable remote code exceeds the minimum behavior necessary for the archive restoration step. ### Attack Path 1. An attacker compromises the remote website, DNS configuration, hosting environment, deployment pipeline, or `install.sh` source. 2. The attacker replaces or redirects the installation script with a malicious shell payload. 3. A user follows the documented disaster-recovery procedure on a fresh server. 4. `curl` retrieves the attacker-controlled response and pipes it directly to `bash`. 5. The payload executes immediately with all privileges held by the invoking user. 6. The payload may steal restored secrets, alter system files, install persistence, or compromise the OpenClaw environment before the gateway starts. ### Impact Assessment Successful exploitation provides arbitrary command execution under the account running the restore pr ...[truncated 870 chars]
- Remediation
- ## Remediation Suggestions 1. Remove the `curl | bash` execution pattern. 2. Download the installer as a separate file so it can be inspected before execution: ```bash curl --fail --show-error --location \ --output openclaw-install.sh \ https://openclaw.ai/releases/VERSION/install.sh ``` 3. Reference an immutable, explicitly pinned release rather than a mutable generic URL. 4. Publish an expected SHA-256 or stronger digest through a separately protected release channel and verify it before execution: ```bash echo 'EXPECTED_SHA256 openclaw-install.sh' | sha256sum --check - ``` 5. Prefer cryptographic release signatures and verify them against a documented, trusted public key. 6. Review the downloaded script locally before running it. 7. Execute the installer using the least-privileged account possible. Elevate only individual operations that demonstrably require administrative access. 8. Separate application installation from backup restoration so users can restore onto an independently verified OpenClaw installation. 9. Replace extraction directly into `/` with validation of archive entries and extraction into a staging directory before copying approved files to their destinations.
