T03 · Remote Payload Retrieval and Execution
Warning
- Location
- scripts/setup.sh:133
- Finding
- Unverified Remote Installer Recommended Through a Pipe-to-Shell Command<![CDATA[ ## Vulnerability Details **File Location**: `scripts/setup.sh`, lines 133-138 **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Medium ### Vulnerable Code ```bash if [ "$HAS_BUN" -eq 0 ]; then echo " To unlock local render mode, install bun:" dim " curl -fsSL https://bun.sh/install | bash" echo "" fi ``` ### Technical Analysis The setup script prints an installation command that downloads content from `https://bun.sh/install` and immediately executes it with `bash`. The setup script does not execute this command automatically; exploitation requires a user or agent to copy and run the displayed recommendation. Nevertheless, piping a network response directly into a shell creates a remote payload execution channel. The effective code is not contained in this audited project and can change after the audit. There is no version pinning, checksum verification, signature validation, or opportunity to inspect the downloaded script before execution. The `bun.sh` domain is the documented Bun installation source, but HTTPS alone does not provide payload immutability. A compromise of the domain, hosting infrastructure, DNS/TLS trust path, deployment process, or upstream installer could replace the expected installer with arbitrary shell commands. Cloud rendering is already presented as a functional zero-install mode. Consequently, recommending pipe-to-shell installation is not necessary for the Skill's baseline functionality and introduces avoidable supply-chain risk. ### Attack Path 1. An attacker compromises the remote installer source, its deployment credentials, hosting infrastructure, or another component capable of changing the response from `https://bun.sh/install`. 2. A user runs `bash scripts/setup.sh` on a system without Bun. 3. The script displays `curl -fsSL https://bun.sh/install | bash` as the recommended method for enabling local rendering. 4. The user or an automated agent copies and runs that comma ...[truncated 958 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the pipe-to-shell recommendation from the setup output. 2. Direct users to Bun's installation documentation instead of emitting an executable command. 3. If an automated installation path is retained: - Download the installer to a local file. - Pin an expected Bun version. - Obtain checksums or signatures through an independently authenticated channel. - Verify the artifact before execution. - Display the source and require explicit user confirmation. 4. Prefer a trusted operating-system package manager where available. 5. Keep cloud rendering as the default when Bun is absent, because it satisfies the declared media-generation functionality without installing executable software. 6. A safer workflow is structurally similar to: ```bash curl --proto '=https' --tlsv1.2 -fLo bun-install.sh \ https://example.invalid/pinned/bun-install.sh printf '%s %s\n' "$EXPECTED_SHA256" bun-install.sh | sha256sum -c - less bun-install.sh bash bun-install.sh ``` The actual URL, version, and checksum must be pinned to an authenticated official release artifact rather than a mutable installer endpoint. ]]>
