T03 · Remote Payload Retrieval and Execution
Error
- Location
- references/cli-installation.md:15
- Finding
- Unverified Remote Installer Is Piped Directly into a Shell<![CDATA[ ## Vulnerability Details **File Location**: `references/cli-installation.md:15-20` **Vulnerability Type**: Remote payload retrieval and immediate execution **Risk Level**: Critical ### Vulnerable Code ```markdown | Platform | Command | |---|---| | macOS (Homebrew) | `brew install aliyun-cli && brew upgrade aliyun-cli` | | macOS / Linux x86_64 | `curl -fsSL --connect-timeout 10 --max-time 120 https://aliyuncli.alicdn.com/setup.sh \| bash` | | Linux ARM64 | `wget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-arm64.tgz && tar -xzf aliyun-cli-linux-latest-arm64.tgz && sudo mv aliyun /usr/local/bin/` | | Windows | Download `https://aliyuncli.alicdn.com/aliyun-cli-windows-latest-amd64.zip`, unzip, and add to PATH | ``` ### Technical Analysis The installation command downloads a mutable shell script and passes it directly to `bash`. The fetched script is not pinned to a specific version and is not verified using a published checksum or cryptographic signature. TLS protects the connection under normal conditions, but it does not make the remote payload immutable. Compromise of the CDN, hosting account, release process, DNS resolution, or TLS trust path could change the code executed after the Skill has already been reviewed. The behavior is not necessary for cluster management. Installation can instead use a pinned package or a separately downloaded and verified archive. ### Attack Path 1. A user follows the documented macOS/Linux installation command. 2. The command retrieves `setup.sh` from the remote CDN. 3. The remote source, delivery path, or release process has been compromised. 4. The modified response is sent directly to `bash` without inspection or integrity verification. 5. The payload executes arbitrary commands with the privileges of the user running the installer. 6. If cloud credentials have already been configured, the payload may access them or invoke cloud APIs under the user's identity. ### Impact Assessment Successful expl ...[truncated 319 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the `curl | bash` installation path. 2. Pin the Aliyun CLI to a reviewed version. 3. Download the installation artifact as a separate step. 4. Publish and verify a SHA-256 checksum or cryptographic signature before execution. 5. Prefer an operating-system package manager where packages are signed and versioned. 6. Display or inspect installation scripts before running them. 7. Document the expected installer source, version, digest, and required privileges. 8. Avoid running the installer with elevated privileges unless a specific installation step requires them. ]]>
