T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:16
- Finding
- Remote Installer Is Downloaded and Executed Without Prior Verification<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:16` **Vulnerability Type**: `T03: 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 command downloads the current response from `https://cli.inference.sh` and pipes it directly into `sh`. The user cannot inspect or authenticate the installer before execution, and the command does not pin a release, artifact, checksum, or signing key. The installation note claims that the remote script detects the operating system and architecture, downloads a binary, and verifies its SHA-256 checksum. However, that verification is performed by the same unverified script being executed. It therefore does not protect against compromise of the installer endpoint or its delivery infrastructure. An attacker controlling the script can remove or bypass the advertised verification entirely. Remote shell execution is not the minimum privilege required to document or use the podcast-generation functionality. A verified, version-pinned CLI binary could be installed without granting a mutable remote response immediate shell execution. ### Attack Path 1. A user or agent follows the documented Quick Start command. 2. The shell requests the current response from `cli.inference.sh`. 3. The service, hosting account, DNS path, or other relevant delivery component is compromised. 4. The endpoint returns attacker-controlled shell commands instead of, or in addition to, the expected installer. 5. The pipeline executes those commands immediately through `sh`. 6. The payload inherits the invoking user's permissions and can access resources available to that account. 7. The subsequent `infsh login` operation may further expose authentication information if the installed CLI has been replaced or modified. ### Impact Assessment A successful exploit provides arbitrary command execution with th ...[truncated 791 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the `curl | sh` installation pipeline. 2. Pin the CLI to a specific reviewed version and immutable release artifact. 3. Download the artifact to disk without executing it: ```bash curl -fL -o infsh.tar.gz "https://dist.inference.sh/<pinned-version>/<pinned-artifact>" ``` 4. Publish the expected SHA-256 digest through an independently authenticated release channel and verify it before extraction or execution: ```bash echo "<expected-sha256> infsh.tar.gz" | sha256sum -c - ``` 5. Prefer cryptographically signed release metadata and verify it using a pinned, documented public key. 6. Display manual installation and inspection instructions as the primary method rather than merely linking to them as an alternative. 7. Install into a user-owned directory without `sudo` or other privilege elevation. 8. Separate installation from authentication so users can validate the installed executable before running `infsh login`. ]]>
