T03 · Remote Payload Retrieval and Execution
Error
- Location
- scripts/setup.sh:187
- Finding
- Unverified Remote Installer Piped Directly to Bash<![CDATA[ ## Vulnerability Details **File Location**: `scripts/setup.sh:187` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical ### Vulnerable Code ```bash dim " curl -fsSL https://bun.sh/install | bash" ``` ### Technical Analysis The setup script recommends downloading a mutable remote installation script and piping it directly into Bash. Although this command is displayed as an instruction rather than automatically executed by `setup.sh`, it is part of the prescribed setup flow and creates a direct remote code-execution channel. HTTPS authenticates the server connection but does not pin the returned artifact. The effective code executed by the user can therefore change after this Skill has been reviewed. A compromise of the remote server, CDN, DNS resolution, publication process, or upstream account could replace the installer with arbitrary shell commands. The command provides no version pin, checksum validation, signature verification, or opportunity to inspect the downloaded content before execution. ### Attack Path 1. An attacker compromises the Bun installer publication account, hosting infrastructure, CDN, or another part of its distribution chain. 2. The content returned from `https://bun.sh/install` is replaced with malicious shell code. 3. A user follows the setup recommendation and runs the displayed command. 4. `curl` downloads the attacker-controlled response. 5. Bash executes the response immediately with the user's current permissions. 6. The payload can access project files, environment variables, Varg credentials, and other data available to that user. ### Impact Assessment Successful exploitation grants arbitrary command execution with the privileges of the user running the installer. This can expose API keys, source code, personal files, and local account data. The payload could also modify shell configuration or install persistence where the user's permissions permit it. No evidence establis ...[truncated 120 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Do not pipe downloaded content directly into a shell. - Prefer a trusted operating-system package manager where available. - Download a version-pinned installer or release artifact to a local file. - Verify the artifact against an independently published cryptographic checksum or signature. - Allow the user to inspect the downloaded script before executing it. - Document the exact expected version and trusted signing identity. - Run installation with the lowest privileges possible and never recommend unnecessary elevation. A safer workflow is: ```bash curl -fL -o bun-install.sh "PINNED_RELEASE_URL" printf '%s %s\n' "EXPECTED_SHA256" "bun-install.sh" | sha256sum -c - less bun-install.sh bash bun-install.sh ``` ]]>
