T03 · Remote Payload Retrieval and Execution
Error
- Location
- README.md:18
- Finding
- Unverified Mutable Remote Script Execution<![CDATA[ ## Vulnerability Details **File Location**: `README.md:18-20` **Vulnerability Type**: Remote payload retrieval and immediate execution **Risk Level**: Critical ### Vulnerable Code ```bash bash -c "$(curl -fsSL https://raw.githubusercontent.com/ERerGB/openclaw-uninstall/main/scripts/install.sh)" ``` ### Technical Analysis The installation instructions download a shell script from the mutable `main` branch of a repository controlled by a personal GitHub account and immediately execute the response with `bash`. The command does not: - Pin the script to an immutable commit or release. - Verify a cryptographic checksum. - Verify a signature or provenance attestation. - Give the user an inspection boundary before execution. Although the version of `scripts/install.sh` present in the audited project only calls the ClawHub CLI, the effective payload executed by this README command is whatever content the remote URL returns at execution time. It can therefore change after the reviewed Skill version has been published or audited. ### Attack Path 1. An attacker compromises the repository owner, GitHub repository, or publication workflow. 2. The attacker replaces `scripts/install.sh` on the `main` branch with a malicious payload. 3. A user follows the installation command from the README. 4. `curl` retrieves the attacker-controlled version. 5. Command substitution passes the response directly to `bash`. 6. The payload executes with all permissions available to the invoking user. The same result could arise from a malicious future commit intentionally added to the mutable branch. ### Impact Assessment Successful exploitation provides arbitrary code execution under the account running the installation command. Depending on that account's permissions, the payload could: - Read or modify user files and OpenClaw credentials. - Install persistent user services. - Alter shell configuration or development tools. - Exfiltrate tokens and other secrets availab ...[truncated 302 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the `curl | bash` installation method from the README. 2. Prefer the existing ClawHub installation command or installation from a locally reviewed clone. 3. If direct download remains necessary: - Publish immutable, versioned release artifacts. - Pin downloads to a release or full commit hash rather than `main`. - Publish SHA-256 checksums through an independent trusted channel. - Verify the checksum before execution. - Prefer signed releases or provenance attestations. 4. Separate download and execution so users can inspect the script: ```bash curl -fSLo install.sh "https://example.invalid/releases/v1.0.0/install.sh" printf '%s %s\n' "<EXPECTED_SHA256>" "install.sh" | sha256sum -c - less install.sh bash install.sh ``` 5. Document that installation should not be performed from an elevated shell unless strictly required. ]]>
