T03 · Remote Payload Retrieval and Execution
- Location
references/cli-installation-guide.md:16- Finding
Unverified Remote Installation Script Is Executed Directly
- Content
View full analysis
Vulnerability Details
File Location:
references/cli-installation-guide.md, line 16
Vulnerability Type: Remote payload retrieval and execution
Risk Level: HighVulnerable code:
bash curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bashTechnical Analysis
The installation command sends content obtained from a remote URL directly to
bash. The downloaded script is not pinned to a specific immutable version, stored for inspection, or validated using a cryptographic checksum or signature before execution.Although the hostname appears related to Alibaba Cloud, the project does not provide evidence that the retrieved resource is immutable or cryptographically authenticated beyond transport-layer HTTPS. The effective code executed by this Skill can therefore change after the Skill itself has been reviewed.
HTTPS protects the connection under normal conditions, but it does not mitigate compromise of the CDN, origin server, DNS or certificate infrastructure, publishing account, or upstream release process. Direct piping also prevents the user from reviewing the exact artifact before it runs.
Attack Path
- An attacker compromises the script’s origin, CDN distribution path, publishing process, or another trusted component in its delivery chain.
- The attacker replaces or modifies
setup.shwith malicious shell commands. - A user follows the Skill’s installation guide.
curlretrieves the attacker-controlled response.- The pipe passes the response directly to
bashwithout integrity validation or review. - The malicious script executes with all privileges available to the user who invoked the command.
Impact Assessment
Successful exploitation permits arbitrary command execution under the invoking user’s account. Depending on that account’s privileges and the behavior of the remote installer, an attacker could read or alter local files, access configured cloud credentials, ...[truncated 342 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the direct
curl | bashpipeline. - Prefer an official operating-system package manager or a versioned release artifact.
- Pin the installation to a reviewed version rather than a mutable URL.
- Download the artifact separately:
bash curl -fL --proto '=https' --tlsv1.2 \ -o aliyun-cli-installer.sh \ 'https://trusted.example/path/to/versioned/setup.sh' - Verify a vendor-published cryptographic signature or SHA-256 digest before execution:
bash sha256sum -c aliyun-cli-installer.sh.sha256 - Inspect the downloaded script and execute it only after verification:
bash less aliyun-cli-installer.sh bash aliyun-cli-installer.sh - Document the expected signer, checksum source, exact version, destination files, and privileges required by the installer.
- Advise users not to run the installer as root unless a specific installation step demonstrably requires elevation.
- Remove the direct
