T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:14
- Finding
- Unverified Remote Installation Script Executed Directly by a Shell<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 14 **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical ### Vulnerable Code ```bash curl -fsSL https://cli.inference.sh | sh && infsh login ``` ### Technical Analysis The Quick Start instructions retrieve a mutable shell script from an external server and immediately execute the response with `sh`. There is no opportunity to inspect the downloaded content, and the command does not authenticate the script using a pinned checksum or trusted digital signature before execution. Although the installation note claims that the script verifies the downloaded CLI binary, this does not establish the integrity of the installer itself. A compromised server, DNS or TLS trust failure, hosting-account takeover, or malicious future change to the installer could cause arbitrary commands to be returned and executed. The remote payload can therefore change after the Skill has been audited. Installing the CLI is related to the declared image-generation and research functionality, but direct execution of mutable remote shell content is not the minimum privilege or minimum-risk mechanism necessary to install it. ### Attack Path 1. A user follows the Quick Start instructions. 2. The shell requests the current content of `https://cli.inference.sh`. 3. The remote endpoint, or infrastructure controlling its response, returns attacker-controlled shell commands. 4. Because the response is piped directly to `sh`, those commands execute without inspection or pre-execution integrity verification. 5. The payload inherits the invoking user's permissions and access to their files, environment variables, network resources, and user-level configuration. 6. The command then invokes `infsh login`; if the installed binary was substituted or modified, the authentication workflow could expose newly entered credentials or tokens. There is no evidence in the reviewed file that the current ...[truncated 923 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Remove the `curl | sh` installation pattern. - Pin the installation to a specific, immutable release rather than a mutable installer endpoint. - Download the release artifact to a local file without executing it. - Verify the artifact before installation using a pinned SHA-256 digest or, preferably, a signed release with a trusted public key obtained independently of the download location. - Display the verification and installation as separate commands so users can inspect the artifact and abort safely. - Use the documented manual installation process as the primary installation path. - Install the binary into a user-owned directory and avoid requiring `sudo` or other elevated permissions. - Keep installation and authentication as separate operations so users can verify which executable will receive their credentials. - Document the expected download host, destination path, checksum source, and verification procedure. ]]>
