T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:284- Finding
Unverified Remote Installer Executed Directly by Bash
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:284
Vulnerability Type: Remote payload retrieval and execution
Risk Level: HighVulnerable Code
markdown - Suggest manual update: `curl -fsSL https://opencode.dev/install | bash`Technical Analysis
The documented fallback update command downloads content from an external URL and pipes it directly into Bash. The downloaded response is not pinned to a reviewed version and is not validated using a cryptographic checksum or publisher signature before execution. It also provides no opportunity to inspect the retrieved script.
Consequently, the code that ultimately executes can change after this Skill has been reviewed. Compromise of the installer publication system, hosting account, domain, DNS resolution, TLS termination infrastructure, or another upstream delivery component could turn the command into an arbitrary-code-execution mechanism.
This behavior is unnecessary for the Skill's core ACP session-management functionality. Even as an update fallback, it exceeds the minimum safe execution model because an authenticated, version-pinned artifact can be downloaded and verified without directly connecting network output to a shell.
Attack Path
- OpenCode's documented automatic update fails or does not produce the expected version.
- The Skill recommends the manual update command to the user.
- An attacker compromises or gains influence over the content returned by
https://opencode.dev/install, or another component in its delivery path. - The user or an automated agent runs the recommended command.
curlretrieves the attacker-controlled response.- The shell immediately interprets the response as Bash code without integrity verification or inspection.
- The payload executes with all privileges available to the invoking account.
Impact Assessment
Successful exploitation permits arbitrary command execution with the invoking user's privileges. The payload could r ...[truncated 492 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the direct
curl | bashpipeline from the instructions. - Prefer an official package manager or another update mechanism that provides authenticated metadata and reproducible version selection.
- If a standalone installer is required:
- Select and download a specific, pinned release.
- Save the artifact to a non-executable file rather than piping it into a shell.
- Obtain the expected digest or signature through an authenticated release channel.
- Verify a pinned SHA-256 checksum or publisher signature before execution.
- Abort on every verification failure.
- Allow the user to inspect the downloaded content.
- Require explicit user approval before executing it.
- Run the installer with the least-privileged account possible and avoid unnecessary privilege elevation.
- Document the files, directories, network access, and permissions required by the installer.
- Where supported, execute installation in a restricted environment and verify the installed binary's version and signature afterward.
- Remove the direct
