T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:14
- Finding
- Remote Installer Is Downloaded and Executed Without Prior Verification<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:14` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High ### Technical Analysis The Quick Start instructions download a mutable script from an external server and pipe it directly into a shell: ```bash curl -fsSL https://cli.inference.sh | sh && infsh login ``` The shell executes the HTTP response immediately, without giving the user an opportunity to inspect it or verify its signature or digest. Although the accompanying documentation states that the installer verifies the SHA-256 checksum of the CLI binary it downloads, that verification occurs only after the unverified installer itself has already started executing. It therefore does not establish the integrity or authenticity of the installer. If the domain, hosting infrastructure, CDN, TLS termination environment, or published installer is compromised, the response can be changed after this Skill has been reviewed. The effective payload is consequently not limited to the content in the audited project. Installing the CLI may be relevant to the declared SEO research functionality, but executing an unverified remote script is not the minimum privilege or minimum-risk installation method necessary to provide that functionality. ### Attack Path 1. A user or agent follows the Quick Start instruction. 2. `curl` retrieves the current response from `https://cli.inference.sh`. 3. An attacker who has compromised the upstream service or distribution infrastructure substitutes a malicious installer. 4. The response is passed directly to `sh` before its contents or integrity can be validated. 5. The malicious installer executes with all permissions of the invoking user. 6. The subsequent `infsh login` command may run an attacker-supplied CLI and expose authentication material entered during login. ### Impact Assessment Successful exploitation provides arbitrary command execution under the account that follows the i ...[truncated 591 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Remove the `curl | sh` installation pattern. - Require users to download a version-pinned release artifact as a separate step. - Publish and verify a cryptographic signature from a trusted, independently distributed signing key. - At minimum, compare the downloaded artifact against a pinned SHA-256 digest before execution; retrieving both the artifact and mutable checksum from the same compromised origin is insufficient by itself. - Allow the installer to be inspected before it is run. - Prefer a trusted package manager with version pinning and package-signature verification where available. - Run installation and authentication without elevated privileges and document the exact files, network destinations, and credentials the CLI accesses. - Separate installation from login so users can validate the installed binary before providing authentication material. ]]>
