T03 · Remote Payload Retrieval and Execution
Error
- Location
- references/cli-installation-guide.md:9
- Finding
- Unverified Remote Installer Is Executed Directly by Bash## Vulnerability Details **File Location**: `references/cli-installation-guide.md`, lines 9–12 **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High ### Vulnerable Code ```bash /bin/bash -c "$(curl -fsSL https://aliyuncli.alicdn.com/install.sh)" aliyun version ``` ### Technical Analysis The installation guide instructs the agent or user to retrieve a mutable shell script from an external URL and pass its contents directly to Bash. Although the URL uses HTTPS and an Alibaba-controlled domain, the command performs no version pinning, checksum verification, signature validation, or local inspection before execution. Consequently, the code that executes is not limited to the content reviewed as part of this Skill. The effective payload can change whenever the remote installer changes. A compromise of the origin, CDN, DNS resolution, certificate trust chain, or release process could therefore turn this installation step into arbitrary local code execution. This behavior is not required at this privilege level. The Skill legitimately needs the Aliyun CLI, but that requirement can be satisfied by installing a pinned, integrity-verified release rather than directly executing a network response. ### Attack Path 1. A user requests an SLS operation supported by the Skill. 2. The Skill determines that Aliyun CLI is missing or outdated. 3. The installation guide directs the user or agent to run the documented command. 4. `curl` retrieves the current contents of `https://aliyuncli.alicdn.com/install.sh`. 5. The shell command substitutes the network response directly into `bash -c`. 6. If the delivery infrastructure or hosted installer has been compromised, attacker-controlled shell commands execute with the privileges of the invoking account. 7. The payload can read accessible files, modify user-level configuration, invoke local tools, or access cloud services through credentials already available to the Aliyun CLI. ### Impact Assessmen ...[truncated 796 chars]
- Remediation
- ## Remediation Suggestions 1. Remove the direct `curl`-to-Bash installation command. 2. Pin installation instructions to a specific Aliyun CLI release version. 3. Download the release artifact to a local file without executing it: ```bash curl --fail --show-error --location \ --output aliyun-cli.tar.gz \ "https://trusted.example/path/to/pinned-version/aliyun-cli.tar.gz" ``` 4. Verify the artifact using an independently published SHA-256 checksum: ```bash echo "<EXPECTED_SHA256> aliyun-cli.tar.gz" | sha256sum --check - ``` 5. Prefer cryptographic signature verification when the publisher provides signed release metadata. 6. Abort installation if integrity verification fails. 7. Prefer a trusted operating-system package manager or a manually reviewed, versioned binary where available. 8. Do not recommend elevated execution unless the installation destination specifically requires it, and clearly disclose any requested privileges. 9. After installation, verify the binary version and provenance before allowing it to access configured cloud credentials.
