T03 · Remote Payload Retrieval and Execution
Error
- Location
- install.sh:28
- Finding
- Unverified Remote Installer Is Piped Directly into a Shell<![CDATA[ ## Vulnerability Details **File Location**: `install.sh:28-35`; also documented in `SKILL.md:126-129` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical ### Vulnerable Code `install.sh:28-35`: ```bash # Install UV install_uv() { if ! command -v uv &> /dev/null; then log_info "Installing UV..." curl -LsSf https://astral.sh/uv/install.sh | sh export PATH="$HOME/.cargo/bin:$PATH" fi log_success "UV version: $(uv --version)" } ``` `SKILL.md:126-129`: ```bash # Install UV curl -LsSf https://astral.sh/uv/install.sh | sh ``` ### Technical Analysis The installation process downloads a mutable script from an external URL and immediately passes its contents to `sh`. No version is pinned, and no checksum, signature, or other integrity verification is performed before execution. HTTPS provides transport protection but does not make the retrieved payload immutable. If the upstream website, release infrastructure, DNS resolution, certificate trust chain, or delivery account is compromised, the downloaded response can be changed after this Skill has been reviewed. Using Astral's documented UV domain reduces the likelihood that the URL is an intentional impersonation, but it does not eliminate the security weakness inherent in executing an unverified remote response. Installing UV is relevant to the declared functionality, but direct `curl | sh` execution exceeds the minimum safe privilege and integrity model required to install it. The downloaded script executes with all privileges of the user running `install.sh`. If the user invokes the installer as root because the same script later runs `apt-get`, the remote payload may receive full system privileges. ### Attack Path 1. An attacker compromises the upstream installer, hosting account, DNS/TLS infrastructure, or another component in the delivery chain. 2. The attacker replaces the expected UV installer response with a malicious s ...[truncated 935 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Do not pipe network responses directly into a shell. 2. Download a versioned installer artifact to a local file first: ```bash curl --fail --location --proto '=https' --tlsv1.2 \ --output uv-installer.sh \ https://example.invalid/versioned/uv-installer.sh ``` 3. Pin the expected release and verify a publisher-provided cryptographic signature or a separately obtained SHA-256 digest before execution: ```bash echo "<trusted-sha256> uv-installer.sh" | sha256sum --check - sh uv-installer.sh ``` 4. Prefer a trusted operating-system package or another package distribution mechanism that already performs signature and integrity verification. 5. Separate unprivileged user-level installation from privileged `apt-get` operations. Do not recommend running the complete project installer as root. 6. Update both `install.sh` and `SKILL.md` so the documented installation procedure follows the same verified process. 7. Record the reviewed UV version and expected digest in the repository to make installation reproducible. ]]>
