T03 · Remote Payload Retrieval and Execution
- Location
- scripts/setup.sh:93
- Finding
- Unverified Remote Installer Is Piped Directly into a Shell<![CDATA[ ## Vulnerability Details **File Location**: `scripts/setup.sh:93-105`; also documented in `SKILL.md:54-60` **Vulnerability Type**: T03: Remote Payload Retrieval and Execution **Risk Level**: Critical ### Vulnerable Code ```bash # Install uv if [ "$IN_CHINA" = true ]; then print_info "Installing uv (may use alternative sources)..." fi # Use official installer (works in most cases) curl -LsSf https://astral.sh/uv/install.sh | sh ``` The documentation also instructs users to execute remote content directly: ```powershell irm https://astral.sh/uv/install.ps1 | iex ``` ```bash curl -LsSf https://astral.sh/uv/install.sh | sh ``` ### Technical Analysis The setup process downloads mutable content from an external URL and immediately executes it in a shell. Although `astral.sh` is presented as the official source for `uv`, the retrieved installer is not pinned to a reviewed version and is not verified using a signature or hard-coded cryptographic checksum. Consequently, the effective code executed during installation can change after this Skill has been reviewed. Compromise of the hosting infrastructure, domain, DNS resolution, certificate trust chain, or distribution process would provide an arbitrary-code execution channel. This behavior exceeds the minimum privilege necessary to install a package manager because installation can be performed using a downloaded, versioned, and independently verified artifact. ### Attack Path 1. A user or Agent invokes `scripts/setup.sh`, or follows the installation commands in `SKILL.md`. 2. The system retrieves the current contents of the remote installer URL. 3. An attacker who has compromised the distribution endpoint or relevant network trust infrastructure substitutes malicious shell code. 4. The shell executes that code immediately without an inspection or verification boundary. 5. The malicious installer gains all privileges available to the invoking user and can access files, environment variables, cre ...[truncated 404 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove all `curl | sh`, `irm | iex`, and equivalent streamed-execution instructions. 2. Pin `uv` to a specific reviewed release. 3. Download the installer or binary to a local temporary file using fail-closed TLS validation. 4. Verify a hard-coded SHA-256 checksum or a trusted release signature before execution. 5. Execute only the verified local artifact. 6. Abort setup if verification fails. 7. Prefer an operating-system package manager or require users to install `uv` separately. 8. Ensure setup never requests elevated privileges for the package-manager installation itself. ]]>
