T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:17
- Finding
- Mutable Remote Installer Is Executed Directly Through a Shell<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:17` and `README.md:36-38` **Vulnerability Type**: Remote payload retrieval and immediate execution **Risk Level**: Critical ### Vulnerable Code `SKILL.md:17`: ```markdown **Install:** `curl -sSL https://raw.githubusercontent.com/synonymdev/bitkit-cli/main/install.sh | sh` ``` `README.md:36-38`: ```bash curl -sSL https://raw.githubusercontent.com/synonymdev/bitkit-cli/main/install.sh | sh ``` ### Technical Analysis The documented installation command retrieves a shell script from the mutable `main` branch and passes its contents directly to `sh`. The effective code executed by a user or agent is therefore determined at installation time, not audit time. The local `install.sh` reviewed in this artifact does not guarantee that the remote file will retain the same contents. This pattern does not provide an opportunity to inspect the downloaded script, does not pin a commit or release, and does not authenticate the script with a separately trusted signature or digest. HTTPS protects transport but does not protect against compromise of the repository, maintainer account, release workflow, or hosting account. Direct remote execution is not the minimum privilege or least-risk mechanism required to install the CLI. The script could instead be downloaded, authenticated, inspected, and executed as a separate operation. ### Attack Path 1. An attacker compromises the GitHub repository, a maintainer account, or a workflow capable of modifying `main`. 2. The attacker replaces `install.sh` with a payload that steals wallet data, modifies shell configuration, downloads further malware, or executes arbitrary commands. 3. A user or AI agent follows the installation instructions. 4. `curl` retrieves the attacker-controlled version. 5. The shell executes the payload immediately with all privileges of the invoking account. 6. If the command is run from a privileged shell or adapted to use `sudo`, the payload c ...[truncated 623 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove all `curl | sh` installation instructions. 2. Pin installation to an explicit version and immutable release artifact rather than `main` or `latest`. 3. Use a staged installation process, for example: - Download the installer or archive to a local file. - Verify it against a digest distributed through an independent trusted channel. - Verify a release signature using a pinned publisher public key. - Inspect the installer before executing it. 4. Document that installation must not be performed with `sudo` unless a specific privileged operation is required and explained. 5. Publish reproducible-build metadata so users can compare release binaries with locally built artifacts. 6. Treat any verification failure, redirect anomaly, or missing verification tool as a fatal error. ]]>
