T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:14
- Finding
- Remote Installer Downloaded and Executed Without Independent Verification## Vulnerability Details **File Location**: `SKILL.md: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 pipe content retrieved from a mutable external URL directly into a shell. The user cannot inspect the downloaded installer before execution, and the command does not pin an installer version, validate the installer against a trusted cryptographic signature, or verify a locally downloaded file before running it. The documentation states that the remote installer verifies the checksum of the CLI binary it downloads. This does not establish the integrity of the installer itself. If the installer endpoint or its deployment infrastructure is compromised, the returned script can change its own verification behavior, select a malicious binary, or execute unrelated commands before any binary verification occurs. Although installing a CLI supports the Skill's declared functionality, immediate execution of mutable remote code is not the minimum-risk installation mechanism. The command runs the installer with all permissions available to the invoking user and then starts an authentication flow. ### Attack Path 1. An attacker compromises the installer endpoint, its hosting infrastructure, or another relevant upstream delivery component. 2. The attacker changes the content returned by `https://cli.inference.sh`. 3. A user or agent follows the documented Quick Start command. 4. `curl` retrieves the attacker-controlled script. 5. The pipe sends the response directly to `sh`, which executes it without inspection or independent integrity validation. 6. The script performs arbitrary operations using the invoking user's permissions. 7. The attacker may access user-readable data, modify user-owned files, steal available credentials, install additi ...[truncated 787 chars]
- Remediation
- ## Remediation Suggestions 1. Remove the `curl | sh` installation pattern. 2. Pin the CLI to a specific reviewed release rather than retrieving an implicitly current version. 3. Download the release artifact to a local file without executing it. 4. Verify the artifact using a cryptographic signature or a pinned SHA-256 digest obtained through an independent trusted channel. 5. Abort installation if verification fails. 6. Execute or install the artifact only after successful verification and, where practical, explicit user approval. 7. Keep `infsh login` separate from installation so authentication is a distinct, user-confirmed action. 8. Publish reproducible release metadata and signed checksums over a separately secured channel. 9. Avoid recommending elevated privileges; install into a user-controlled location with only the permissions required by the CLI.
