T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:26- Finding
Unverified Remote Installer Executed Through curl-to-shell Instructions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:23-29, with the same unsafe installation pattern repeated inscripts/doctor.sh:23-28,scripts/doctor.sh:36-41, andscripts/run-ulw.sh:46-50
Vulnerability Type: Remote payload retrieval and execution
Risk Level: HighVulnerable Code
SKILL.md:23-29:bash 1. **OpenCode** installed and configured (`opencode --version` should be 1.0.150+) ```bash curl -fsSL https://opencode.ai/install | bash # or: npm install -g opencode-ai # or: bun install -g opencode-ai ```scripts/doctor.sh:23-28:bash else fail "OpenCode is not installed" echo " Install: curl -fsSL https://opencode.ai/install | bash" echo " Or: npm install -g opencode-ai" exit 1 fiscripts/doctor.sh:36-41:bash elif command -v npx &>/dev/null; then warn "bunx not found, npx available (bunx is recommended)" else fail "Neither bunx nor npx found" echo " Install Bun: curl -fsSL https://bun.sh/install | bash" fiscripts/run-ulw.sh:46-50:bash if ! command -v opencode &>/dev/null; then echo "Error: opencode is not installed" echo "Install: curl -fsSL https://opencode.ai/install | bash" exit 1 fiTechnical Analysis
The primary prerequisite instructions tell the user or executing Agent to download an installer from a mutable external URL and pipe the response directly into Bash. This combines retrieval and execution without an opportunity to inspect the content and without validating a cryptographic signature, checksum, immutable release version, or expected file identity.
Although the shell scripts only print this command rather than executing it themselves, installation instructions are operational Skill behavior: an Agent using the Skill may present or follow them. The effective code executed by the user can therefore change after this Skil ...[truncated 1712 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove all
curl ... | bashrecommendations from the Skill and scripts. - Pin installation instructions to an immutable, audited release version rather than a mutable installer endpoint.
- Download the artifact to a local file before execution:
bash curl --fail --show-error --location \ --output opencode-installer.sh \ https://trusted.example/releases/vX.Y.Z/install.sh - Publish and verify a SHA-256 or stronger digest obtained through an independently protected release channel:
bash echo "EXPECTED_SHA256 opencode-installer.sh" | sha256sum --check - - Prefer signed release artifacts and verify the signature against a pinned maintainer key.
- Allow the user to inspect the downloaded script before execution.
- Require explicit confirmation before executing any downloaded code.
- Document that installers must not be run as root unless system-wide installation is strictly necessary.
- Update
doctor.shandrun-ulw.shto link to verified manual installation documentation instead of printing executable curl-to-shell commands.
- Remove all
