T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:16
- Finding
- Unverified Remote Installer Executed Directly by a Shell<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:16` **Vulnerability Type**: Remote payload retrieval and immediate execution **Risk Level**: High ### Vulnerable Code ```bash curl -fsSL https://cli.inference.sh | sh && infsh login ``` ### Technical Analysis The installation command downloads a mutable script from `https://cli.inference.sh` and sends it directly to `sh`. The user has no opportunity to inspect the retrieved content before execution, and the command does not pin a release, verify the installer against an independently obtained digest, or validate a cryptographic signature. The documentation states that the installation script detects the operating system and architecture, downloads a binary, and verifies its SHA-256 checksum. However, this verification is performed by the same unverified remote script being executed. If that script is compromised, it can omit or falsify the binary verification step. Executing a live remote installer is not required for the Skill's declared product-image generation functionality. A manually downloaded, pinned, and independently verified CLI would provide the necessary functionality with substantially less supply-chain exposure. ### Attack Path 1. An attacker compromises `cli.inference.sh`, its deployment pipeline, hosting account, DNS configuration, or another component of its delivery path. 2. The attacker modifies the installer response to include malicious shell commands. 3. A user or agent follows the Quick Start instructions. 4. `curl` retrieves the attacker-controlled response and pipes it directly into `sh`. 5. The malicious commands execute with all permissions available to the invoking user. 6. The payload can access user-readable data, alter user-writable files, steal credentials available to the process, install additional software, or retrieve further payloads. ### Impact Assessment Successful exploitation provides arbitrary command execution under the account that runs the ins ...[truncated 771 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the `curl | sh` installation pattern from the primary installation instructions. 2. Pin the CLI to a specific reviewed release rather than downloading the latest mutable installer. 3. Download the CLI artifact without executing it: - Select the expected operating-system and architecture artifact explicitly. - Save it to a local file. - Refuse redirects to unexpected hosts. 4. Verify the artifact using a SHA-256 digest obtained through an independent trusted channel. Prefer a cryptographically signed release manifest over an unsigned checksum file hosted beside the artifact. 5. Inspect the downloaded artifact and installation procedure before granting execute permission. 6. Install the executable into a user-scoped directory with minimal permissions; do not request administrator or root privileges. 7. Document the domains contacted, files created, authentication storage location, and uninstall procedure. 8. If an installer script remains available, present it only as a secondary convenience option accompanied by an explicit remote-code-execution warning, rather than as the default Quick Start command. ]]>
