T03 · Remote Payload Retrieval and Execution
Error
- Location
- scripts/install.sh:127
- Finding
- Unverified Remote Shell Installer Download and Execution<![CDATA[ ## Vulnerability Details **File Location**: `scripts/install.sh:127-134`; duplicated in `scripts/install-with-model-choice.sh:127-134` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High ### Vulnerable Code ```bash UV_INSTALL_SCRIPT="/tmp/uv-install-$$.sh" if curl -LsSf https://astral.sh/uv/install.sh -o "$UV_INSTALL_SCRIPT"; then if head -1 "$UV_INSTALL_SCRIPT" | grep -qE '^#!(/bin/sh|/bin/bash|/usr/bin/env)'; then chmod +x "$UV_INSTALL_SCRIPT" if sh "$UV_INSTALL_SCRIPT"; then ``` ### Technical Analysis Both installers download a mutable shell script from an external URL and execute it without verifying a pinned cryptographic hash or publisher signature. Downloading the payload to a file instead of piping it directly to a shell does not eliminate the underlying supply-chain risk. The shebang check only confirms that the response superficially resembles a script. A malicious payload can include a valid shebang and then execute arbitrary commands. The remote installation of `uv` is ancillary dependency setup rather than a core part of voice processing. Automatically executing mutable remote code therefore grants more trust than is necessary. ### Attack Path 1. An attacker compromises the remote installation endpoint, its delivery infrastructure, or a relevant trust dependency. 2. The attacker returns a modified script beginning with an accepted shebang such as `#!/bin/sh`. 3. The installer downloads the script to `/tmp/uv-install-$$.sh`. 4. The shebang check succeeds. 5. `sh "$UV_INSTALL_SCRIPT"` executes the attacker's code. 6. The payload gains all privileges available to the user running the installer. If installation is performed as root, the payload executes with root privileges. ### Impact Assessment Successful exploitation permits arbitrary local command execution, persistence installation, credential theft, modification of OpenClaw components, and access to all files available to the ...[truncated 92 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Do not execute a mutable installation script fetched at runtime. - Prefer an operating-system package or a version-pinned release artifact. - Pin the exact `uv` version. - Verify the artifact using a hard-coded SHA-256 digest obtained through a trusted release process. - Where available, verify a publisher signature against a bundled trusted public key. - Download using a securely created temporary file, such as one returned by `mktemp`. - Abort installation if any integrity verification fails. - Apply the same remediation to both installer scripts. - Avoid instructing users to run the entire Skill installer as root. ]]>
