T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:34
- Finding
- Unpinned Remote Installation Script Executed Directly by a Shell<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 34 and 62 **Vulnerability Type**: Remote payload retrieval and execution through a mutable external URL **Risk Level**: High ### Vulnerable Code At line 34: ```bash curl -fsSL https://raw.githubusercontent.com/leeguooooo/Mailbox/main/install.sh | sh # installs the prebuilt binary to ~/.local/bin — make sure that's on PATH, then re-probe export PATH="$HOME/.local/bin:$PATH"; mailbox --version ``` The same installation pattern is repeated at line 62: ```bash # 1. Install the CLI from GitHub Releases (no npm/Node needed; prebuilt binary): curl -fsSL https://raw.githubusercontent.com/leeguooooo/Mailbox/main/install.sh | sh # (npm is deprecated: `npm install -g @leeguoo/mailbox-cli` may lag the releases) ``` ### Technical Analysis The Skill retrieves `install.sh` from the mutable `main` branch of a personal GitHub repository and pipes its contents directly to `sh`. No immutable commit, release version, checksum, or cryptographic signature is used to establish the integrity of the downloaded script. This creates a remote code-execution channel whose effective payload can change after the Skill has been reviewed. The shell begins executing the response without retaining it for inspection. The `-f`, `-s`, and `-S` options also make this installation path relatively non-interactive, while `-L` follows redirects. Installing a CLI is related to the declared email-management functionality, but executing an unverified, mutable script is not the minimum privilege or trust necessary to perform that installation. A verified release artifact could be installed without granting a mutable branch immediate shell execution. ### Attack Path 1. An attacker compromises the repository owner’s GitHub account, repository permissions, release process, or another component capable of modifying `install.sh` on `main`. 2. The attacker inserts commands into `install.sh` that steal credentials, alter local fil ...[truncated 1428 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove all `curl | sh` installation instructions. 2. Pin the installation to a specific, immutable release version or commit rather than `main`. 3. Download the artifact to a local file before executing or installing it: ```bash curl -fL -o mailbox.tar.gz \ https://github.com/leeguooooo/Mailbox/releases/download/v2.11.2/mailbox-<platform>.tar.gz ``` 4. Publish a trusted SHA-256 digest through a separately protected release process and verify it before extraction: ```bash echo "<EXPECTED_SHA256> mailbox.tar.gz" | sha256sum --check - ``` 5. Prefer cryptographic release signatures with a documented, pinned public key. A checksum hosted only beside a compromised artifact does not independently establish trust. 6. Extract and install only the expected binary into a user-owned directory without invoking an arbitrary installer script. 7. Document the exact files created and required permissions. 8. Do not install automatically merely because `mailbox` is absent. Ask for explicit user approval and show the source, version, destination, and verification result. 9. If an installation script is unavoidable, pin it to an immutable commit, download it for inspection, verify its digest or signature, and execute it only after explicit approval. ]]>
