T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:58
- Finding
- Remote installer is downloaded and executed without integrity verification<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 58-60 **Vulnerability Type**: Remote code execution through mutable external content **Risk Level**: High ### Vulnerable Code ```bash # Install nvm curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash ``` ### Technical Analysis The installation instructions pipe an HTTP response directly into `bash`. Although the URL points to the established `nvm-sh/nvm` GitHub repository and the referenced version is fixed in the path, the downloaded bytes are not authenticated with a checksum or cryptographic signature before execution. The effective code executed on the user's machine can therefore differ from the content reviewed in this project. A compromise of the upstream repository, hosting account, content-delivery path, or certificate trust environment could turn this command into arbitrary shell execution. Installing Node.js is relevant to the Skill, but immediate remote-to-shell execution is not the minimum privilege or safest mechanism necessary to achieve that purpose. ### Attack Path 1. An attacker compromises the upstream repository, release content, hosting account, or another trusted part of the delivery path. 2. The response for `install.sh` is replaced with attacker-controlled shell code. 3. A user follows the Skill instructions and runs the command. 4. `curl` writes the attacker-controlled response directly to standard output. 5. `bash` executes it immediately with the user's permissions and without an inspection or integrity-verification step. 6. The payload can modify user files, establish persistence, steal accessible credentials, or install further payloads. ### Impact Assessment Successful exploitation provides arbitrary command execution with the privileges of the user running the installation command. This normally includes access to the user's home directory and may include OpenClaw configuration, sessions, browser profiles, workspace data, an ...[truncated 121 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Do not pipe downloaded content directly into a shell. 2. Prefer installation through an operating-system package manager or a documented official installer with signature verification. 3. If a shell installer is required: - Download it to a local file. - Obtain the expected SHA-256 digest from a separately authenticated source. - Verify the digest before execution. - Allow the user to inspect the file. - Execute it only after successful verification. 4. Pin a reviewed immutable commit or signed release rather than relying only on a tag path. 5. Document that the installer must not be run as root unless upstream installation explicitly requires it. A safer pattern is: ```bash curl --fail --show-error --location \ --output /tmp/nvm-install.sh \ https://raw.githubusercontent.com/nvm-sh/nvm/<reviewed-commit>/install.sh printf '%s %s\n' '<EXPECTED_SHA256>' '/tmp/nvm-install.sh' | sha256sum --check - bash /tmp/nvm-install.sh rm -- /tmp/nvm-install.sh ``` ]]>
