T03 · Remote Payload Retrieval and Execution
Error
- Location
- Openclaw一键安装.md:37
- Finding
- Remote Installation Script Executed Directly Through Bash<![CDATA[ ## Vulnerability Details **File Location**: `Openclaw一键安装.md`, line 37 **Vulnerability Type**: Remote code retrieval and immediate shell execution **Risk Level**: Critical ### Vulnerable Code ```bash curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash ``` ### Technical Analysis The command downloads shell code from an external URL and immediately passes it to Bash. The retrieved bytes are not saved for inspection and are not verified against a cryptographic checksum or signature. The URL points to the established `nvm-sh/nvm` GitHub repository and includes a version tag, which reduces—but does not eliminate—risk. Git tags and remotely served content are not equivalent to local cryptographic verification. If the repository, referenced tag, hosting account, delivery path, or user trust chain is compromised, arbitrary replacement commands would execute with the privileges of the user running the installer. This behavior is not required for the Skill's declared Xiaohongshu research, drafting, publishing, and comment-management functionality. ### Attack Path 1. A user follows the document's recommended one-click installation instructions. 2. `curl` connects to the external GitHub-hosted URL and retrieves the current response body. 3. The response is streamed directly into Bash without inspection or integrity verification. 4. A compromised or altered response executes arbitrary shell commands. 5. Those commands can read or modify any resource accessible to the invoking user and can install additional payloads or persistence mechanisms. ### Impact Assessment Successful exploitation provides arbitrary code execution under the invoking user's account. The effective scope can include user files, browser data, locally accessible credentials, shell configuration, OpenClaw configuration, and other resources available to that account. If a user independently runs the command with elevated privileges, the impact would expand ac ...[truncated 71 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Do not pipe remote content directly into a shell. 2. Download the installer to a local file first. 3. Pin the source to a reviewed immutable commit rather than relying only on a mutable tag. 4. Publish and verify a trusted SHA-256 checksum or cryptographic signature before execution. 5. Display the downloaded script for review and require explicit user confirmation. 6. Prefer platform package-management mechanisms with provenance and integrity verification. 7. Keep runtime installation separate from this Skill because it is not necessary for the Skill's core content-operations workflow. A safer pattern is: ```bash curl -fL -o /tmp/nvm-install.sh "https://raw.githubusercontent.com/nvm-sh/nvm/<immutable-commit>/install.sh" printf '%s %s\n' "<trusted-sha256>" "/tmp/nvm-install.sh" | shasum -a 256 -c - less /tmp/nvm-install.sh bash /tmp/nvm-install.sh ``` ]]>
