T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:213
- Finding
- Unpinned Remote Installer Is Downloaded and Executed Directly## Vulnerability Details **File Location**: `SKILL.md`, lines 213-216 **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical ### Vulnerable Code ```text install (review the installer script before piping `curl | bash`): ``` curl -fsSL https://opencode.ai/install | bash ``` ``` ### Technical Analysis The installation fallback pipes mutable content retrieved from an external URL directly into a shell. The downloaded script is not pinned to an immutable version, authenticated with a cryptographic signature, or checked against an expected digest before execution. Although the surrounding instruction recommends reviewing the installer, the command itself provides no review step: the response body is immediately interpreted by `bash`. Consequently, the effective code executed by the Skill can change after the Skill package has been reviewed. Executing a remote installer is not required for the Skill's core ACP session-control functionality. Including it as an update fallback therefore expands the privilege and supply-chain exposure beyond the minimum necessary behavior. `CHANGELOG.md:56` records that a safety note was added, but this documentation-only warning does not technically mitigate the unsafe execution path. ### Attack Path 1. The agent checks the installed OpenCode version and determines that an update is available. 2. The documented restart-based automatic update does not produce the expected version. 3. The agent follows the fallback command in `SKILL.md`. 4. `curl` retrieves the current response from `https://opencode.ai/install`. 5. A compromised website, hosting environment, DNS or delivery path, or maliciously modified upstream installer supplies attacker-controlled shell code. 6. The response is passed directly to `bash` without review or integrity verification. 7. The attacker-controlled code executes with the operating-system privileges and environment inherited ...[truncated 851 chars]
- Remediation
- ## Remediation Suggestions 1. Remove the direct `curl | bash` pipeline from the Skill. 2. Prefer installation through a trusted package manager that supports pinned versions and package-signature verification. 3. If a standalone installer must be supported: - Pin an immutable release artifact rather than a mutable installer endpoint. - Download the artifact to a dedicated file without executing it. - Verify a vendor-published cryptographic signature or pinned SHA-256 digest. - Display the verified script or provide its path for review. - Require explicit user approval before execution. - Execute it with the least-privileged account and in a constrained environment. 4. Do not allow the agent to infer approval merely because an update is available or a restart-based update failed. 5. Document the expected release version, artifact URL, checksum source, and verification procedure. 6. Treat verification failure, redirects to unexpected hosts, and transport errors as hard failures rather than reasons to execute an unverified response.
