T03 · Remote Payload Retrieval and Execution
Error
- Location
- EXAMPLES.md:414
- Finding
- Remote Script Downloaded and Executed Without Verification## Vulnerability Details **File Location**: `EXAMPLES.md:414` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High **Vulnerable Code**: ```markdown - [ ] Install Rust via rustup: `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh` ``` ### Technical Analysis This instruction pipes a mutable network response directly into `sh`. Although HTTPS provides transport encryption and the referenced domain is the official rustup installation domain, the command does not verify a pinned artifact, checksum, digital signature, or expected script contents before execution. The effective code can change after the Skill has been reviewed. A compromise of the remote host, its delivery infrastructure, or a trusted upstream component could cause arbitrary shell commands to execute. The shell inherits the invoking user's environment and permissions. Installing Rust is not required for the Skill's declared codebase-analysis functionality. Even when Rust installation is relevant to an onboarding checklist, directly executing an unreviewed remote response exceeds the minimum privileges and trust necessary. ### Attack Path 1. The Skill generates or presents the Rust Day 1 checklist from the example. 2. A user copies the provided command into a local shell. 3. `curl` retrieves the current response from `https://sh.rustup.rs`. 4. The response is passed directly to `sh` without inspection or integrity verification. 5. If the response or delivery chain has been compromised, attacker-controlled commands execute with the user's permissions. 6. Those commands can read accessible repository files and credentials, modify the user's files, install additional components, or establish persistence. ### Impact Assessment Successful exploitation provides arbitrary command execution under the account that runs the command. The payload could access all files and credentials available to that user, including sour ...[truncated 306 chars]
- Remediation
- ## Remediation Suggestions - Remove the pipe-to-shell installation command from the example. - Prefer linking users to the official Rust installation documentation rather than generating a directly executable remote-script command. - Where an automated installation is necessary, download a versioned artifact separately, verify its publisher signature or a checksum obtained through an independent trusted channel, inspect it, and only then execute it. - Prefer a trusted operating-system package manager when an appropriate Rust package is available. - Add a Skill-level rule prohibiting generated `curl | sh` and `wget | sh` commands unless the user explicitly requests them and acknowledges the risk. - Ensure generated onboarding guides distinguish commands inferred from repository documentation from commands independently recommended by the Skill.
