T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:85- Finding
Alibaba Cloud CLI bootstrap executes a mutable remote script without integrity verification
- Content
View full analysis
= 3.3.3 required** > [MUST] Verify: `aliyun version` — must be >= 3.3.3 (>= 3.3.5 recommended). > - First install or major upgrade: `/bin/bash -c "$(curl -fsSL --connect-timeout 10 --max-time 120 https://aliyuncli.alicdn.com/setup.sh)"` > - Routine update (CLI >= 3.3.5): `aliyun upgrade`. ``` The same command is repeated in `references/cli-installation-guide.md`: ```bash /bin/bash -c "$(curl -fsSL --connect-timeout 10 --max-time 120 https://aliyuncli.alicdn.com/setup.sh)" ``` ### Technical Analysis The command retrieves the current response from an external HTTPS endpoint and passes it directly to Bash through command substitution. The downloaded content is neither pinned to an immutable version nor checked against a cryptographic hash or digital signature. Consequently, the effective code executed by the Skill can change after the reviewed package has been published. HTTPS protects the transport under ordinary conditions, but it does not protect against compromise of the vendor endpoint, storage account, publishing pipeline, DNS/TLS trust chain, or authorized upstream maintainer account. The use of `curl -f` ensures that HTTP failures are rejected, but it does not establish artifact authenticity or integrity. Timeouts similarly provide availability safeguards rather than security validation. ### Attack Path 1. An attacker compromises the remote `setup.sh` object, its publishing pipeline, or another trusted component in its delivery path. 2. The remote endpoint begins returning a modified shell script. 3. A user follows the Skill's mandatory first-install or major-upgrade prerequisite. 4. `curl` downloads the attacker-controlled response. 5. Bash immediately e ...[truncated 928 chars]- Remediation
View remediation
/installer' printf '%s %s\n' '' 'aliyun-cli-installer' | sha256sum --check - chmod 700 aliyun-cli-installer ./aliyun-cli-installer rm -f aliyun-cli-installer ``` The actual release URL and digest must come from official, independently verified release metadata. ]]>
