T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:106
- Finding
- Mutable Remote Installers Are Executed Directly Without Authenticating the Installer<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:106`, `SKILL.md:115`, `SKILL.md:122`; `references/install.md:11`, `references/install.md:27`, `references/install.md:35` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High ### Vulnerable Code ```bash curl -sSfL https://github.com/CognizTech/stateroot/releases/latest/download/install.sh | sh ``` ```powershell irm https://github.com/CognizTech/stateroot/releases/latest/download/install.ps1 | iex ``` The same installation patterns are repeated in `references/install.md`. ### Technical Analysis The Skill retrieves an installation script from a mutable `latest` GitHub release URL and passes the response directly to a command interpreter. The effective code executed on a user's machine can therefore change after this Skill package has been reviewed. The documentation states that the installer verifies the downloaded StateRoot binary against `checksums.txt`. That does not authenticate the installer itself: the shell or PowerShell interpreter has already started executing the remotely retrieved script before any binary checksum validation occurs. If both the binary and checksum are served from the same compromised release channel, an ordinary unkeyed checksum also does not establish publisher authenticity. The Skill appropriately says to ask for confirmation, but user confirmation does not eliminate the supply-chain risk. The installation of a CLI is necessary for the declared bootstrap function; direct execution of a mutable network response is not the minimum-risk method necessary to accomplish it. ### Attack Path 1. An attacker compromises the GitHub repository, maintainer account, release workflow, release assets, or another component capable of changing the response for the mutable `latest` installer URL. 2. The attacker replaces `install.sh` or `install.ps1` with a malicious script. 3. The user or agent follows the Skill instructions. 4. `curl | sh` or `irm | ...[truncated 1092 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Do not pipe network responses directly into `sh`, PowerShell, or another interpreter. 2. Pin downloads to a specific release version rather than the mutable `latest` alias. 3. Download the installer and its detached signature as separate files. 4. Verify the installer using a trusted public key distributed independently of the release assets. 5. Display the verified installer path and require explicit confirmation before execution. 6. Pin and verify the final executable independently with a signed release manifest. 7. Prefer an established signed package format where available, such as the signed Windows MSI. 8. Document the expected installer digest and exact files it will create or modify. 9. Ensure verification fails closed and never advise users to bypass a signature or checksum failure. ]]>
