T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:16- Finding
Unpinned Remote Installer Is Executed Directly by a Shell
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:16
Vulnerability Type: Remote payload retrieval and execution
Risk Level: HighVulnerable Code:
bash curl -fsSL https://cli.inference.sh | sh && infsh loginTechnical Analysis
The quick-start command downloads a mutable script from
https://cli.inference.shand passes it directly tosh. The remote content is therefore executed before the user can inspect it, and no installer version, immutable digest, or locally verified signature is specified.The document states that the installer detects the operating system and architecture, downloads a binary, and verifies its SHA-256 checksum. That downstream check does not secure the bootstrap script itself: the remotely delivered script can execute arbitrary commands before, instead of, or in addition to the documented verification process.
HTTPS protects the connection under normal conditions but does not make the delivered payload immutable. A compromise of the hosting domain, web application, CDN, deployment credentials, or signing infrastructure could change the effective code after this skill has been reviewed. Direct shell execution is not necessary for the declared background-removal functionality and introduces a broader code-execution channel than the task requires.
Attack Path
- An attacker compromises, or otherwise gains the ability to alter, content served by
cli.inference.shor its delivery infrastructure. - The attacker replaces the expected installer with a script containing arbitrary shell commands while optionally retaining normal installation behavior.
- A user or agent follows the documented quick-start command.
curlretrieves the modified content and streams it directly tosh.- The malicious commands execute immediately with the permissions of the user running the skill.
- The attacker may then install a modified
infshbinary, read user-accessible fi ...[truncated 747 chars]
- An attacker compromises, or otherwise gains the ability to alter, content served by
- Remediation
View remediation
Remediation Suggestions
- Remove the
curl | shinstallation path from the quick-start instructions. - Publish versioned CLI artifacts at immutable release URLs and require users to download the artifact separately.
- Publish a fixed SHA-256 digest or, preferably, a cryptographic signature through an independently authenticated release channel.
- Require checksum or signature verification before making the binary executable or running any installer.
- Pin the documented CLI version rather than retrieving the latest mutable installer.
- Document the exact files, directories, environment settings, and network endpoints used by installation.
- Ensure installation is performed without
sudoor equivalent elevation and fails if elevation is unexpectedly requested. - Offer package-manager installation only through a reviewed, signed, and versioned repository.
A safer documented sequence should separate download, verification, and execution, for example:
bash curl -fL -o infsh.tar.gz https://trusted.example/releases/infsh-VERSION-PLATFORM.tar.gz echo "EXPECTED_SHA256 infsh.tar.gz" | sha256sum -c - # Extract and install only after successful verification.- Remove the
