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 ### Vulnerable Code ```bash curl -fsSL https://cli.inference.sh | sh && infsh login ``` ### Technical Analysis The Quick Start instructions pipe a mutable HTTPS response directly into `sh`. The downloaded installer is therefore executed with the invoking user's privileges before the user can inspect it or independently verify its integrity. Although the document claims that the installer verifies the SHA-256 checksum of a subsequently downloaded binary, that process does not establish the integrity of the installer itself. A compromised installer could bypass or falsify its own verification procedure. The repository does not pin an installer version, provide an expected installer digest, verify a digital signature, or include the installer source for review. This installation mechanism is not required for the Skill's core email-design guidance. It is needed only to use an optional external image-generation service and consequently exceeds the minimum access needed for the Skill's principal documentation functionality. ### Attack Path 1. A user copies the Quick Start command into a shell. 2. `curl` retrieves the current response from `https://cli.inference.sh`. 3. A compromise of the hosting service, CDN, DNS path, deployment credentials, or installer publication process changes the remote response. 4. The pipe passes the response directly to `sh`, without saving it for inspection or verifying it against a repository-pinned digest or signature. 5. The malicious response executes with all privileges available to the invoking user. 6. The payload can access user-readable data, alter user-writable files, install additional components, or capture credentials subsequently entered during `infsh login`. ### Impact Assessment Successful exploitation permits arbitrary command execution under the account that ru ...[truncated 529 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the `curl | sh` pipeline and make the external image-generation tooling explicitly optional. 2. Pin the installer and CLI to an immutable, documented version. 3. Download the artifact without executing it: ```bash curl -fL -o infsh-installer.sh "https://example.invalid/infsh-installer-VERSION.sh" ``` 4. Publish the expected SHA-256 digest in the reviewed Skill repository rather than obtaining both the artifact and its trust value from the same mutable endpoint. 5. Require users to verify the downloaded artifact before execution: ```bash echo "EXPECTED_SHA256 infsh-installer.sh" | sha256sum --check - ``` 6. Prefer a cryptographic signature verified against a public key distributed through a separate trusted channel. 7. Allow users to inspect the saved installer before invoking it explicitly. 8. Prefer a recognized package manager with version pinning, integrity metadata, and reproducible release artifacts. 9. Document the files, network endpoints, credentials, and permissions used by the CLI so users can make an informed trust decision. ]]>
