T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:15
- Finding
- Remote Bun Installer Is Downloaded and Executed Without Verification<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:15` **Vulnerability Type**: Remote payload retrieval and immediate shell execution **Risk Level**: Critical ### Vulnerable Code ```bash bun --version || curl -fsSL https://bun.sh/install | bash ``` ### Technical Analysis If Bun is unavailable, this command downloads a mutable shell script from `https://bun.sh/install` and passes it directly to Bash. The downloaded content is not pinned to a specific release and is not checked against a cryptographic signature or expected checksum. The command therefore delegates arbitrary shell execution to the current response returned by the remote server. Even if the domain is normally associated with the legitimate Bun project, compromise of its hosting environment, distribution account, DNS resolution, or release pipeline could change the effective payload after this Skill has been reviewed. Installing Bun is relevant to the documented workflow, but executing an unverified remote response directly in a shell exceeds the minimum-risk method necessary to satisfy that prerequisite. ### Attack Path 1. The Skill is activated for an API-to-CLI task. 2. The prerequisite command checks whether Bun is installed. 3. If `bun --version` fails, `curl` retrieves the current installer response. 4. A compromised distribution endpoint or supply chain returns modified shell code. 5. Bash executes that code immediately with the privileges of the agent or user. 6. The payload can access the user's files, credentials, shell configuration, generated projects, and authenticated development tools. ### Impact Assessment Successful exploitation provides arbitrary command execution under the account running the Skill. The payload could: - Read or modify files accessible to the user. - Access API tokens and development credentials available to the process. - Modify shell initialization files or user-level executable paths. - Tamper with generated CLI source code and later pub ...[truncated 261 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Remove the direct `curl | bash` pipeline. - Prefer installation through a trusted operating-system package manager with a pinned package version. - If a standalone installer is required: 1. Download a version-specific artifact to a local file. 2. Verify its SHA-256 checksum or publisher-provided cryptographic signature. 3. Display the source and destination to the user. 4. Request explicit approval before executing it. 5. Run it without elevated privileges unless elevation is demonstrably required. - Document Bun as an optional prerequisite and stop with safe manual installation instructions when it is missing. - Pin the Bun version used to build and test generated CLIs. ]]>
