T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:32
- Finding
- Unverified Remote Installer Scripts Are Downloaded and Immediately Executed<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:32-35`; also documented in `README.md:165-180`, `README.zh-CN.md:162-177`, and `install.ps1:3-7` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical ### Vulnerable Code ```markdown ## Install ```bash curl -fsSL https://raw.githubusercontent.com/johnsonbuilds/skillsync/main/install.sh | sh ``` ``` The Windows documentation provides the equivalent PowerShell pattern: ```powershell irm https://raw.githubusercontent.com/johnsonbuilds/skillsync/main/install.ps1 | iex # Windows PowerShell 5.1: iwr <url> -UseBasicParsing | iex ``` ### Technical Analysis The recommended installation commands retrieve a script from the mutable `main` branch of a personal GitHub repository and pass the response directly to a command interpreter. No release version, immutable commit hash, checksum, or cryptographic signature is verified before execution. Consequently, the effective code executed by users can differ from the code audited in this project. HTTPS protects the connection in transit but does not protect against compromise of the repository owner, GitHub account, branch, or upstream source. The risk is amplified on Unix because the retrieved installer can invoke `sudo apt-get` when virtual-environment creation fails. Even though the currently reviewed script only attempts to install `python3-venv`, a future or compromised remotely delivered script would not be constrained to that behavior. ### Attack Path 1. An attacker compromises the GitHub account, repository, default branch, or another component able to modify the raw installer response. 2. The attacker replaces `install.sh` or `install.ps1` on `main` with malicious commands. 3. A user or AI Agent follows the documented one-line installation instruction. 4. `curl` or `Invoke-RestMethod` downloads the modified payload. 5. `sh` or `Invoke-Expression` executes it without verification or inspection. 6. The payload operat ...[truncated 709 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove all `curl | sh`, `irm | iex`, and `iwr | iex` installation instructions. 2. Publish versioned release artifacts instead of executing files from `main`. 3. Pin downloads to an immutable release tag and, preferably, a full commit or content digest. 4. Publish SHA-256 checksums or cryptographic signatures through an independently protected release channel. 5. Require a download-and-verify workflow, for example: ```sh curl -fSLo install.sh https://example.invalid/releases/v0.3.1/install.sh echo "<expected-sha256> install.sh" | sha256sum -c - less install.sh sh install.sh ``` 6. Prefer installation from a trusted package index using an exact version: ```sh python3 -m pip install "skillsync==0.3.1" ``` 7. Do not automatically request elevation from a remotely delivered installer. Detect missing system packages and print explicit manual installation instructions instead. 8. Apply the corrected instructions consistently to `SKILL.md`, both README files, and comments in both installers. ]]>
