T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:314
- Finding
- Unverified Remote Installer Is Piped Directly Into a Shell<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:314-316` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical ### Vulnerable Code ```bash # If that fails, try the direct method (because npm) curl -fsSL https://cli.openclaw.ai/install.sh | sh ``` ### Technical Analysis The Skill instructs the user or agent to download a mutable shell script and immediately execute it. The installer is not pinned to an immutable release, saved for inspection, or verified using a cryptographic signature or expected digest. The effective code executed by this command can therefore change after the Skill has been reviewed. HTTPS protects the connection in transit but does not establish that every future script served by the endpoint is safe. Compromise of the hosting account, deployment pipeline, DNS infrastructure, TLS termination environment, or installer itself would turn this instruction into an arbitrary-code-execution channel. The Skill declares root or sudo access as a prerequisite. Although `sh` does not explicitly use `sudo`, users may invoke the workflow from a root shell, substantially increasing the potential impact. ### Attack Path 1. An attacker compromises the installer host, its deployment pipeline, or another component controlling the response from `https://cli.openclaw.ai/install.sh`. 2. The attacker replaces or modifies the installer with commands that steal credentials, alter binaries, install persistence, or destroy data. 3. A user or agent follows the Skill and executes the documented `curl | sh` command. 4. The remote response is passed directly to the shell without validation. 5. The attacker's commands execute with the privileges of the invoking account, potentially including root privileges. ### Impact Assessment Successful exploitation provides arbitrary command execution under the invoking account. In the expected root/sudo operating context, an attacker could obtain complete host control, access ...[truncated 145 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Remove the direct pipe from `curl` to `sh`. - Use an immutable, version-specific installer URL rather than a mutable latest installer. - Download the installer to a local file before execution. - Verify an expected SHA-256 digest or, preferably, a signature tied to a trusted publisher key. - Present the script for review before executing it. - Abort when verification fails; do not silently fall back to remote execution. - Run installation under the least-privileged account possible and elevate only individual operations that require it. - Prefer a signed operating-system package or a version-pinned package-manager installation. A safer pattern is: ```bash curl -fL -o /tmp/openclaw-install.sh \ "https://cli.openclaw.ai/releases/<fixed-version>/install.sh" printf '%s %s\n' '<reviewed-sha256>' /tmp/openclaw-install.sh | sha256sum -c - chmod 700 /tmp/openclaw-install.sh /bin/sh /tmp/openclaw-install.sh ``` ]]>
