T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:24
- Finding
- Unverified Remote Installer and Binary Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:24`; `references/cli-installation-guide.md:14`; `references/cli-installation-guide.md:36-43` **Vulnerability Type**: Unverified remote payload retrieval and execution **Risk Level**: High ### Vulnerable Code ```bash # SKILL.md:24 /bin/bash -c "$(curl -fsSL --connect-timeout 10 --max-time 120 https://aliyuncli.alicdn.com/setup.sh)" ``` ```bash # references/cli-installation-guide.md:14 /bin/bash -c "$(curl -fsSL --connect-timeout 10 --max-time 120 https://aliyuncli.alicdn.com/setup.sh)" ``` ```bash # references/cli-installation-guide.md:36-43 wget --connect-timeout=10 --read-timeout=120 --tries=3 -qO- https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz | tar xz sudo mv aliyun /usr/local/bin/ wget --connect-timeout=10 --read-timeout=120 --tries=3 -qO- https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-arm64.tgz | tar xz sudo mv aliyun /usr/local/bin/ ``` ### Technical Analysis The Skill directs the user or Agent to download mutable content and immediately execute or install it. The installation script is passed directly to Bash, while the alternative workflow streams an archive into `tar` and then moves the resulting executable into a system-wide executable directory. No exact release is pinned, and the instructions provide no checksum, cryptographic signature, or independent integrity verification. HTTPS protects transport under normal conditions but does not protect against compromise of the distribution origin, CDN, signing infrastructure, DNS or certificate ecosystem, or vendor publication pipeline. The use of a `latest` archive further prevents reviewers from determining which effective payload will execute after the Skill has been audited. ### Attack Path 1. An attacker compromises or gains publication access to the installer endpoint, CDN, archive, or associated distribution infrastructure. 2. The attacker replaces `setup.sh` or a `latest` archive with a modified payload. ...[truncated 1270 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove all `curl | bash`, command-substitution execution, and streamed archive extraction instructions. 2. Pin a specific CLI version rather than downloading a mutable `latest` artifact. 3. Prefer a trusted operating-system package manager or Homebrew package with package-signing verification. 4. If manual installation is required: - Download the archive to a non-executable temporary directory. - Download the vendor-published checksum and detached signature through an independently authenticated channel. - Verify the signature and SHA-256 checksum before extraction. - Inspect the archive file list and reject absolute paths, traversal entries, links, and unexpected files. - Extract without elevated privileges. - Show the exact source, version, checksum, destination, and requested privilege change to the user. - Obtain explicit user approval before moving the verified binary into a system directory. 5. Verify the installed binary's checksum and version after installation. 6. Document a trusted rollback process for restoring the previous CLI binary. ]]>
