T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:16
- Finding
- Unverified Remote Installer Executed Directly in a Shell<![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 retrieves mutable content from `https://cli.inference.sh` and pipes it directly into `sh`. The downloaded installer is therefore executed before the user can inspect it, pin its version, or independently verify its integrity. The install note claims that the script detects the operating system and architecture, downloads a binary, and verifies its SHA-256 checksum. However, verification performed by the remotely retrieved installer does not establish the integrity of the installer itself. A modified installer can bypass or replace its own verification logic and execute arbitrary commands. The effective payload can change after the Skill has been reviewed. Compromise of the remote server, publishing infrastructure, domain, or delivery path could turn the documented installation command into an arbitrary-code-execution channel. Executing a remote installer is not necessary for the Skill’s core image-upscaling functionality. At minimum, installation should be separated from execution and use a version-pinned, independently verified artifact. ### Attack Path 1. A user or agent follows the Quick Start instructions. 2. `curl` requests the current response hosted at `cli.inference.sh`. 3. The response is passed directly to `sh` without local review or independent integrity verification. 4. If the hosted script or its delivery infrastructure has been compromised, attacker-controlled shell commands execute with the invoking user’s privileges. 5. The malicious installer can access user-readable files and credentials, alter the user environment, download additional payloads, or establish persistence where existing permissions allow. ### Impact Assessment Successful expl ...[truncated 581 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the `curl | sh` installation pattern. 2. Publish versioned CLI artifacts and require users to select a specific immutable release. 3. Download the artifact to disk without executing it automatically. 4. Publish cryptographic checksums or signatures through an independently trusted channel. 5. Require verification before installation, for example: - Verify a SHA-256 digest against a release-pinned value. - Prefer a signed artifact and validate the signature against a documented public key. 6. Keep installation and authentication as separate commands so installation success does not automatically trigger credential-related operations. 7. Prefer a reputable package manager that supports version pinning, integrity metadata, and package provenance. 8. Document the destination path, files created, network endpoints contacted, and permissions required by the CLI. ]]>
