T03 · Remote Payload Retrieval and Execution
Error
- Location
- _shared/preflight.md:18
- Finding
- Dynamic Download and Execution of a Remote Installer## Vulnerability Details **File Location**: `_shared/preflight.md`, lines 18–29 **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High ### Vulnerable Code ```bash # macOS/Linux curl -sSL "https://raw.githubusercontent.com/okx/onchainos-skills/${LATEST_TAG}/install.sh" -o /tmp/onchainos-install.sh curl -sSL "https://github.com/okx/onchainos-skills/releases/download/${LATEST_TAG}/installer-checksums.txt" -o /tmp/installer-checksums.txt # Windows Invoke-WebRequest -Uri "https://raw.githubusercontent.com/okx/onchainos-skills/${LATEST_TAG}/install.ps1" -OutFile "$env:TEMP\onchainos-install.ps1" Invoke-WebRequest -Uri "https://github.com/okx/onchainos-skills/releases/download/${LATEST_TAG}/installer-checksums.txt" -OutFile "$env:TEMP\installer-checksums.txt" # After checksum verification sh /tmp/onchainos-install.sh # or: & "$env:TEMP\onchainos-install.ps1" ``` The preceding instruction dynamically obtains `LATEST_TAG` from: ```bash curl -sSL "https://api.github.com/repos/okx/onchainos-skills/releases/latest" ``` ### Technical Analysis The mandatory preflight procedure resolves the latest release at runtime, downloads an installer, and executes it with the privileges of the Agent process. This creates a remote code-execution channel whose effective payload can change after the Skill package has been reviewed. The source belongs to the GitHub organization corresponding to the declared OKX publisher rather than an unrelated personal paste service, and the procedure requires SHA-256 verification. These controls reduce accidental corruption and some tampering risks. They do not, however, eliminate the supply-chain trust issue because the installer and its checksum are retrieved from the same upstream administrative trust boundary. Compromise of the repository, publisher account, release workflow, or release assets could allow an attacker to replace both artifacts consistently. Resolving the latest release rather than using an audite ...[truncated 1573 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the installer to a specifically audited release instead of resolving the latest release dynamically. 2. Embed the expected installer digest in the reviewed Skill package rather than downloading both the installer and its checksum from the same trust boundary. 3. Verify signed release artifacts using a publisher signing key whose trust anchor is distributed independently of the release repository. 4. Require explicit, informed user approval before installing or updating executable software. 5. Separate dependency installation from routine token-data operations; do not automatically update an already functional binary merely because a periodic cache has expired. 6. Display the resolved version, source URL, signer identity, and verification result before execution. 7. Run installation with the minimum necessary user privileges and avoid requesting elevated privileges. 8. Preserve a verified prior version and provide a rollback mechanism if installation or post-installation validation fails.
