T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:18
- Finding
- Unverified Remote Installer Is Executed Directly Through Bash## Vulnerability Details **File Location**: `SKILL.md:18` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High **Complete Code Snippet**: ```bash bun --version || curl -fsSL https://bun.sh/install | bash ``` ### Technical Analysis When Bun is unavailable, the command retrieves a mutable installation script from `https://bun.sh/install` and pipes it directly into Bash. The downloaded content is not pinned to a version, saved for inspection, or validated with a cryptographic checksum or signature. The domain is associated with the Bun project, but transport security alone does not establish that the returned script is the exact artifact reviewed by the Skill author. Compromise of the upstream website, CDN, release process, DNS path, or TLS endpoint could change the effective payload after this Skill has been reviewed. Executing an installer is relevant to establishing the documented CLI environment, but immediate `curl | bash` execution is not the minimum privilege or minimum-risk mechanism required. Bun could instead be declared as a prerequisite or installed from a pinned and independently verified artifact. ### Attack Path 1. A user or agent follows the setup instructions on a system where `bun` is unavailable or not in `PATH`. 2. The `bun --version` command fails, causing the shell to execute the right-hand side of `||`. 3. `curl` downloads the current response from `https://bun.sh/install`. 4. The response is passed directly to Bash without integrity or authenticity verification beyond HTTPS. 5. If the upstream response has been compromised, attacker-controlled shell commands execute immediately. 6. Those commands can modify files, install additional payloads, alter shell configuration, or access data available to the invoking account. ### Impact Assessment The remote script executes with all privileges of the user running the setup command. In a typical non-root environment, thi ...[truncated 497 chars]
- Remediation
- ## Remediation Suggestions - Remove the direct `curl | bash` pipeline and document Bun as an explicit prerequisite where practical. - Prefer the operating system's trusted package manager or another controlled installation mechanism. - If direct artifact installation is necessary: 1. Pin an exact Bun release version. 2. Download the installer or release artifact to a local file. 3. Verify a publisher signature or a SHA-256 checksum obtained through an independently trusted channel. 4. Inspect or constrain the downloaded installer before execution. 5. Run it as an unprivileged user and document all files and configuration it modifies. - Fail closed when verification cannot be completed. - Avoid recommending elevated execution such as `sudo` unless a separately justified operation strictly requires it.
