T03 · Remote Payload Retrieval and Execution
Error
- Location
- references/install.md:37
- Finding
- Mutable Unix Installer Is Retrieved and Executed Without Prior Verification<![CDATA[ ## Vulnerability Details **File Location**: `references/install.md`, lines 37–60 **Vulnerability Type**: Remote payload retrieval and immediate shell execution **Risk Level**: Critical ### Vulnerable Code ```bash ## macOS and Linux Install with the Unix installer: curl -LsSf https://wemol.wecomput.com/static/wemol-cli/latest/install.sh | sh The default release base URL is: https://wemol.wecomput.com/static/wemol-cli To override it temporarily: curl -LsSf https://wemol.wecomput.com/static/wemol-cli/latest/install.sh | \ WEMOL_INSTALL_BASE_URL="https://your-release-base" sh To install a specific version: curl -LsSf https://wemol.wecomput.com/static/wemol-cli/latest/install.sh | \ sh -s -- --version v1.0.0 ``` ### Technical Analysis The instructions pipe content retrieved from a mutable `latest/install.sh` URL directly into a shell. The script is not saved for inspection, pinned by digest, or cryptographically authenticated before execution. Although the documentation states that the installer later retrieves `SHA256SUMS` for binary artifacts, that does not authenticate the installer itself. The remote script is already executing before it performs any artifact verification. A checksum retrieved from the same distribution origin also does not protect against compromise of that origin. The nominally version-specific command pins only the binary version argument. It still executes the mutable `latest/install.sh` script. The release-base override also allows the executing installer to retrieve artifacts from an arbitrary location. This may be legitimate for testing, but it increases supply-chain risk if an attacker can influence the environment or generated command. ### Attack Path 1. `wemol-cli` is absent or below the documented baseline. 2. The Skill directs the agent or user to invoke the installation command. 3. The distribution endpoint, DNS/TLS path, hosting account, or mutable installer content is compromised. 4. The attacker re ...[truncated 746 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove every `curl | sh` installation command. 2. Resolve and display an immutable release version before downloading. 3. Download the installer or binary to a local file without executing it. 4. Verify a cryptographic signature using a trusted public key distributed separately from the release server. 5. Pin the expected artifact digest in the reviewed Skill release; do not rely solely on a checksum fetched from the same mutable origin. 6. Inspect the downloaded script or use a minimal, locally reviewed installation routine. 7. Require explicit user approval before executing a downloaded installer. 8. Restrict destination permissions and ensure the installer cannot modify unrelated shell or startup configuration. 9. Remove or tightly constrain `WEMOL_INSTALL_BASE_URL`; never allow untrusted input to select an executable distribution source. ]]>
