T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:14
- Finding
- Unverified Remote Installer Executed Directly by a Shell<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 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 command downloads mutable content from `https://cli.inference.sh` and immediately passes it to `sh`. The remote response is neither inspected nor authenticated before execution. Consequently, the effective code executed by the command can change after this Skill has been reviewed. The install note claims that the downloaded binary is checked using SHA-256, but this does not authenticate the installer itself. A compromised installer can omit or falsify its verification process, execute unrelated commands, or retrieve additional payloads. The repository does not contain a pinned installer, trusted checksum, or signature against which the remote response can be independently validated. This behavior exceeds the minimum privileges necessary for the declared case-study-writing functionality. Most writing guidance requires no code installation. Even when optional research or visualization features are desired, executing an unreviewed remote script with all privileges of the invoking user is not a least-privilege installation mechanism. ### Attack Path 1. An attacker compromises `cli.inference.sh`, its hosting account, deployment pipeline, DNS resolution, or another relevant delivery component. 2. The attacker replaces the expected installer response with a malicious shell script. 3. A user or automation agent follows the Quick Start command in `SKILL.md`. 4. `curl` retrieves the attacker-controlled response. 5. The pipe sends the response directly to `sh` without review or prior integrity verification. 6. The malicious script executes with the permissions of the invoking user and may retrieve further payloads, inspect local files, steal credentials, or establish persistence. ### Impact ...[truncated 613 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the `curl | sh` installation pattern. 2. Make external tooling optional because the core writing functionality does not require local code installation. 3. Publish versioned CLI artifacts and require users to download a specific immutable release. 4. Publish expected cryptographic hashes through a trusted, independently protected release channel. 5. Require checksum or digital-signature verification before any downloaded file is executed. 6. Prefer a reputable package manager with pinned versions and package-signing support. 7. Provide a manual installation procedure that allows users to inspect the installer and binary before execution. 8. If an installer remains necessary, run it with least privilege, document every filesystem and network operation, and avoid requesting administrative access. 9. Pin the installer URL to a specific reviewed version rather than serving mutable content from a generic endpoint. ]]>
