T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:24
- Finding
- Unverified Remote Bun Installer Is Piped Directly into a Shell<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:24-27` **Vulnerability Type**: Remote payload retrieval and immediate execution **Risk Level**: Critical ### Complete Code Snippet ```bash 1. 安装 bun: ```bash command -v bun >/dev/null 2>&1 && echo "bun $(bun --version)" || { curl -fsSL https://bun.sh/install | bash && source ~/.bashrc; } ``` ``` ### Technical Analysis The installation instruction retrieves a mutable script from `https://bun.sh/install` and pipes it directly into `bash`. The response is executed before the user can inspect it, and the command does not pin an installer version or validate a checksum or cryptographic signature. Although installing Bun is related to the declared functionality, executing an unverified remote response is not the minimum privilege or safest mechanism necessary to install the runtime. The effective code executed on the machine can change after the Skill has been reviewed. The risk applies even when the current endpoint is legitimate: compromise of the hosting service, distribution infrastructure, DNS or TLS trust chain, or installer publishing account could turn this command into arbitrary code execution. ### Attack Path 1. A user follows the documented prerequisite instructions. 2. Bun is not already installed, causing the fallback branch to run. 3. `curl` downloads the current response from `bun.sh`. 4. The response is passed directly to `bash` without integrity verification. 5. A compromised or malicious response executes with the privileges of the user running the command. 6. The payload can inspect files, access environment variables, modify the host, or steal wallet credentials subsequently stored on the system. ### Impact Assessment The remote payload obtains arbitrary command execution with the invoking user's privileges. Because the documentation consistently uses `/root/opinionskills`, execution as root is plausible. In that case, the payload could obtain full system control, ...[truncated 136 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Remove the `curl | bash` installation workflow. - Pin a specific reviewed Bun release rather than using a mutable installer endpoint. - Download the release artifact as a separate step. - Verify its publisher-provided cryptographic signature or checksum before installation. - Install the verified artifact using the minimum required privileges. - Provide manual inspection instructions and fail closed if verification fails. - Avoid recommending root execution when user-level installation is sufficient. ]]>
