T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:213- Finding
Unpinned Remote Installer Is Downloaded and Executed Directly
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 213-216
Vulnerability Type: Remote payload retrieval and execution
Risk Level: CriticalVulnerable Code
text install (review the installer script before piping `curl | bash`):curl -fsSL https://opencode.ai/install | bash
text 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:56records that a safety note was added, but this documentation-only warning does not technically mitigate the unsafe execution path.Attack Path
- The agent checks the installed OpenCode version and determines that an update is available.
- The documented restart-based automatic update does not produce the expected version.
- The agent follows the fallback command in
SKILL.md. curlretrieves the current response fromhttps://opencode.ai/install.- A compromised website, hosting environment, DNS or delivery path, or maliciously modified upstream installer supplies attacker-controlled shell code.
- The response is passed directly to
bashwithout review or integrity verification. - The attacker-controlled code executes with the operating-system privileges and environment inherited ...[truncated 851 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the direct
curl | bashpipeline from the Skill. - Prefer installation through a trusted package manager that supports pinned versions and package-signature verification.
- 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.
- Do not allow the agent to infer approval merely because an update is available or a restart-based update failed.
- Document the expected release version, artifact URL, checksum source, and verification procedure.
- Treat verification failure, redirects to unexpected hosts, and transport errors as hard failures rather than reasons to execute an unverified response.
- Remove the direct
