T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:21
- Finding
- Unpinned Alibaba Cloud CLI Download Without Integrity Verification<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 21-25 **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium ### Vulnerable Code ```bash curl -fsSL https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz -o /tmp/aliyun-cli.tgz mkdir -p ~/.local/bin tar -xzf /tmp/aliyun-cli.tgz -C /tmp mv /tmp/aliyun ~/.local/bin/aliyun chmod +x ~/.local/bin/aliyun ``` ### Technical Analysis The installation procedure downloads a mutable `latest` archive and installs the executable without verifying its version, cryptographic checksum, or digital signature. HTTPS protects transport under normal conditions, but it does not establish that the downloaded artifact is the exact version reviewed or expected by the user. If the distribution server, publishing process, DNS resolution, TLS trust chain, or upstream release artifact is compromised, the downloaded archive could contain an attacker-controlled executable. The binary is then moved into `~/.local/bin`, marked executable, and subsequently invoked for authenticated Alibaba Cloud operations. The referenced domain is consistent with the stated Alibaba Cloud source, and the project contains no evidence that it currently serves a malicious artifact. The vulnerability is the absence of artifact pinning and integrity verification. ### Attack Path 1. An attacker compromises the upstream artifact, publishing infrastructure, or another relevant part of the software supply chain. 2. The mutable `aliyun-cli-linux-latest-amd64.tgz` resource is replaced with a modified archive. 3. A user follows the documented installation procedure. 4. The altered binary is extracted and installed as `~/.local/bin/aliyun` without checksum or signature validation. 5. The user invokes the binary to configure credentials or manage DNS records. 6. The malicious executable runs with the user's local privileges and can access credentials and resources available to that user. ### Impact Assessment Succ ...[truncated 519 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the Alibaba Cloud CLI to a specific, reviewed release instead of using a mutable `latest` URL. 2. Obtain the vendor-published SHA-256 checksum through an independently authenticated channel. 3. Verify the archive before extraction and terminate installation if validation fails: ```bash printf '%s %s\n' '<EXPECTED_SHA256>' /tmp/aliyun-cli.tgz | sha256sum --check - ``` 4. Prefer vendor-supported digital-signature verification when signatures are available. 5. Download into a private temporary directory created with `mktemp -d`, and remove it after installation. 6. Record the installed version and verified digest in validation evidence so installations are reproducible. 7. Avoid silently replacing an existing CLI binary; require explicit confirmation or validate the existing installation first. ]]>
