T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:14
- Finding
- Unverified Remote Installer Executed Directly by a Shell## Vulnerability Details **File Location**: `SKILL.md:14-17` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High **Vulnerable Code**: ```bash ## Install CLI curl -fsSL https://cli.inference.sh | sh infsh login ``` ### Technical Analysis The installation procedure downloads mutable content from `https://cli.inference.sh` and sends it directly to `sh`. The downloaded script is therefore executed before the user can inspect it or verify its integrity. Its effective behavior can change at any time after this Skill has been audited. HTTPS protects transport under ordinary circumstances but does not protect users if the hosting account, web server, DNS configuration, certificate infrastructure, or release pipeline is compromised. The subsequent claim that the installer verifies the CLI binary does not address this trust gap: the unverified installer itself is already running and can bypass or falsify any later verification. This behavior exceeds the minimum privileges necessary to install the CLI because the same document provides a manual download-and-verification procedure. Installation does not inherently require immediate interpretation of a mutable network response. ### Attack Path 1. An attacker compromises the installer endpoint, its hosting infrastructure, DNS, certificate chain, or deployment pipeline. 2. The attacker replaces the installer response with a malicious shell script. 3. A user or agent follows the documented installation command. 4. `curl` retrieves the attacker-controlled response and pipes it directly into `sh`. 5. The payload executes with all permissions available to the invoking account. 6. The payload can read accessible credentials, modify user files, replace executables, or establish persistence without performing the advertised installation. ### Impact Assessment Successful exploitation grants arbitrary command execution with the privileges of the user ...[truncated 461 chars]
- Remediation
- ## Remediation Suggestions - Remove the pipe-to-shell installation command. - Require an immutable, version-pinned release artifact rather than a moving “latest” installer. - Download the artifact to disk before execution or installation. - Verify its SHA-256 digest against a value obtained from an independently trusted, versioned source. - Prefer mandatory Sigstore verification rather than making signature verification conditional on whether `cosign` happens to be installed. - Display the resolved URL and version to the user and require explicit approval before installing. - Install only into a user-owned directory such as `~/.local/bin`; do not request elevated privileges. - Avoid `sha256sum --ignore-missing` for security-critical verification. Explicitly identify the expected artifact and fail closed if its checksum entry is absent.
