T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:14
- Finding
- Mutable Remote Installer Is Piped Directly into a Shell<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 14 **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 downloads a mutable response from `https://cli.inference.sh` and immediately executes it with `sh`. There is no opportunity to inspect the installer before execution, no immutable version is selected, and no independently pinned checksum or signature is verified before the script runs. The note at line 24 states that the installer verifies the checksum of the downloaded CLI binary. That does not protect the bootstrap process itself: the remotely supplied shell script is already executing and could omit or bypass its advertised verification behavior. Its contents may also change after this Skill has been reviewed. This installation behavior exceeds the minimum privilege needed to provide book-cover design guidance. Although installation of the `infsh` client supports the AI-generation workflow, executing an unreviewed remote script is not necessary; the client can be distributed through a versioned, independently verifiable installation process. ### Attack Path 1. An attacker compromises the installer domain, CDN, hosting account, DNS resolution, TLS endpoint, or release pipeline. 2. The response served from `https://cli.inference.sh` is replaced with a malicious shell script. 3. A user follows the documented Quick Start command. 4. `curl` retrieves the modified response and pipes it directly to `sh`. 5. The malicious response executes with all permissions available to the invoking user or Agent. 6. The payload can access readable files, modify writable resources, invoke network services, or install additional components before optionally presenting a legitimate login flow. ### Impact Assessment Successful exploitation provides arbitrary command execution under the account ...[truncated 606 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the `curl ... | sh` installation pattern. 2. Direct users to a versioned release artifact on an official, authenticated release page. 3. Pin an exact CLI version rather than downloading the current mutable version. 4. Download the artifact to a local file without executing it. 5. Verify its SHA-256 digest against a digest pinned in reviewed documentation, or preferably verify a release signature against a trusted public key. 6. Execute or install the artifact only after successful independent verification. 7. Publish the installer source and encourage inspection before execution. 8. Keep authentication separate from installation so users can review installation results before running `infsh login`. 9. Document what data `infsh login` and subsequent generation requests transmit to the external service. ]]>
