T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:16
- Finding
- Remote Installer Is Downloaded and Executed Without Independent Verification<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 16 **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High ### Vulnerable Code ```bash curl -fsSL https://cli.inference.sh | sh && infsh login ``` ### Technical Analysis The Quick Start instructions pipe the response from `https://cli.inference.sh` directly into `sh`. The downloaded content is therefore executed before the user can inspect it or independently verify its integrity. Although the documentation claims that the installer verifies the checksum of the CLI binary, that verification is performed by the same mutable remote script being trusted. It does not protect against compromise of the installer endpoint, DNS or hosting infrastructure, or the installer publication process. A malicious installer could omit verification, substitute another checksum source, or execute unrelated commands. This behavior is not the minimum privilege or trust necessary to install a command-line client. The installer runs with all permissions of the invoking user. No explicit privilege escalation is shown, and the documentation claims elevated permissions are unnecessary, but user-level execution can still access or modify data available to that account. ### Attack Path 1. An attacker compromises or gains control over `cli.inference.sh` or its delivery infrastructure. 2. The attacker replaces the expected installer response with malicious shell commands. 3. A user follows the documented Quick Start command. 4. `curl` retrieves the attacker-controlled response. 5. The pipe passes the response directly to `sh` without inspection or independent validation. 6. The payload executes with the current user's privileges and may steal credentials, alter files, establish user-level persistence, or retrieve additional payloads. 7. The subsequent `infsh login` operation could also expose newly created authentication material if the installed executable was replaced or modified. ## ...[truncated 603 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the `curl | sh` installation pattern. 2. Pin the CLI to a specific reviewed version rather than retrieving an implicitly mutable latest release. 3. Provide separate download and verification steps, for example: - Download the binary or installer to a local file. - Obtain a version-specific checksum or signature through a separately authenticated trust mechanism. - Verify the artifact locally using a hardcoded expected digest or a trusted signing key. - Execute or install it only after successful verification. 4. Prefer signed release artifacts and document signature verification with a pinned public key. 5. Publish the installer source and allow users to inspect the downloaded file before execution. 6. Explicitly warn users not to run the installer as root or through `sudo`. 7. Document where credentials are stored and the permissions required by `infsh login`. ]]>
