T03 · Remote Payload Retrieval and Execution
Error
- Location
- README.md:91
- Finding
- Mutable Remote Installation Script Is Executed Directly by a Shell<![CDATA[ ## Vulnerability Details **File Location**: `README.md:91-100`; duplicated in `references/install.md:23-30` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High ### Vulnerable Code From `README.md:91-100`: ```bash # Method A: npm (recommended, consistent across platforms) pnpm add -g @mp2rss/cli # Method B: macOS / Linux one-click script curl -fsSL https://raw.githubusercontent.com/areyoubugcoder/mp2rss-cli/main/scripts/install.sh | sh ``` The same unsafe installation command appears in `references/install.md:23-30`: ```bash ### B. One-click script (macOS / Linux) ```bash curl -fsSL https://raw.githubusercontent.com/areyoubugcoder/mp2rss-cli/main/scripts/install.sh | sh ``` Automatically selects the corresponding macOS or Linux binary and installs it into `/usr/local/bin` or `~/.local/bin`. ``` ### Technical Analysis The installation instructions download a shell script from the mutable `main` branch of a personal GitHub repository and immediately pipe it into `sh`. This creates a remote code-execution channel whose effective payload can change after the Skill package has been reviewed. The downloaded script is not included in the audited project. Consequently, its behavior, download validation, filesystem changes, and privilege handling cannot be verified from this artifact. The instructions do not pin an immutable commit or release, verify a cryptographic signature, check a trusted SHA-256 digest, or provide an inspection step before execution. Installing the CLI is necessary for the declared functionality, but executing a mutable remote script without verification is not necessary and exceeds the minimum-risk installation process. ### Attack Path 1. An attacker compromises the GitHub account, repository, branch protection, or another component capable of modifying `scripts/install.sh` on the `main` branch. 2. The attacker changes the installer to include arbitrary shell commands while retaining expected i ...[truncated 1080 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the `curl ... | sh` installation method from both `README.md` and `references/install.md`. 2. Direct users to a specific, versioned release rather than the mutable `main` branch. 3. Publish SHA-256 checksums through an authenticated release process and require verification before extraction or execution. 4. Prefer cryptographic release signatures, such as Sigstore/cosign or GPG signatures, and document verification against a pinned publisher identity. 5. Use a staged installation process: ```bash curl -fL -o mp2rss.tar.gz https://github.com/areyoubugcoder/mp2rss-cli/releases/download/vX.Y.Z/mp2rss_OS_ARCH.tar.gz echo "<trusted-sha256> mp2rss.tar.gz" | sha256sum -c - tar -xzf mp2rss.tar.gz install -m 0755 mp2rss "$HOME/.local/bin/mp2rss" ``` 6. If a script remains available, require users to download it, verify its signature or pinned digest, inspect it, and execute it separately. 7. Do not instruct Agents to perform installation automatically without explicit user approval. ]]>
