T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:16
- Finding
- Unverified Remote Rust Installer Executed Directly by Shell## Vulnerability Details **File Location**: `SKILL.md`, line 16 **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High **Complete Code Snippet**: ```bash curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` ### Technical Analysis The installation command retrieves a script from an external URL and passes the response directly to `sh`. The downloaded content is neither pinned to an immutable version nor verified using a cryptographic signature or expected digest before execution. The HTTPS and TLS restrictions protect the network connection, but they do not guarantee that the mutable content hosted at the URL remains safe. A compromise of the upstream infrastructure, distribution service, publishing credentials, DNS or certificate trust chain could cause different commands to be delivered after the Skill has been reviewed. Installing Rust is consistent with the Skill's declared Stellar development setup functionality. However, executing mutable network content without independent verification exceeds the minimum risk necessary to perform that installation. ### Attack Path 1. An attacker compromises the upstream installer, its publishing process, hosting infrastructure, or another relevant delivery component. 2. The attacker modifies the response from `https://sh.rustup.rs` to include malicious shell commands. 3. A user or agent follows the installation instructions in `SKILL.md`. 4. `curl` retrieves the altered script. 5. The shell immediately executes the response without providing an opportunity for integrity verification or review. 6. The malicious commands run with the permissions of the account executing the Skill. ### Impact Assessment Successful exploitation provides arbitrary command execution under the invoking user's privileges. The resulting access could include reading or modifying user-accessible files, stealing development credentials and source code, alteri ...[truncated 379 chars]
- Remediation
- ## Remediation Suggestions - Do not pipe network responses directly into a shell. - Prefer an authenticated operating-system package manager or another installation mechanism that verifies publisher metadata. - If the upstream installer must be used, download it to a local file first. - Pin the installer to an immutable, reviewed release where the publisher supports doing so. - Verify a publisher-provided cryptographic signature or a securely obtained, pinned SHA-256 digest before execution. - Allow the downloaded script to be inspected before running it. - Execute the installer as an unprivileged user and avoid unnecessary `sudo` or root execution. - Document the expected files and environment changes so users can assess the installation scope.
