T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:32
- Finding
- Mutable Remote Installer Is Downloaded and Executed Directly<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:32-40`; repeated in `references/onboarding.md:33-43` and `references/cli-usage.md:7-28` **Vulnerability Type**: Remote payload retrieval and immediate shell execution **Risk Level**: Critical ### Vulnerable Code `SKILL.md:32-40`: ```markdown ## Install If `save-to-spotify` is not available on `PATH`, ask the user to confirm CLI installation first, then install it: ```shell curl -fsSL https://saveto.spotify.com/install.sh | bash ``` On Windows, run this in **Git Bash** (ships with Git for Windows) — it installs `save-to-spotify.exe` to `~/.local/bin`. ``` `references/cli-usage.md:17-28` also provides parameterized versions: ```shell # Specific version curl -fsSL https://saveto.spotify.com/install.sh | bash -s -- --version 0.2.0 # Custom directory curl -fsSL https://saveto.spotify.com/install.sh | bash -s -- --dir ~/.local/bin # Via environment variables SAVE_TO_SPOTIFY_VERSION=0.2.0 SAVE_TO_SPOTIFY_INSTALL_DIR=~/.local/bin \ curl -fsSL https://saveto.spotify.com/install.sh | bash ``` ### Technical Analysis Piping `curl` directly into Bash executes the current response from a mutable remote endpoint without first saving, inspecting, or independently authenticating it. HTTPS protects transport to the endpoint but does not make the endpoint's future contents immutable. The documentation states that the installer downloads a binary and verifies its SHA-256 checksum. This does not address the primary trust problem because the installer performing that verification is itself the unverified remote payload. Neither the installer nor a pinned digest or trusted signing key is included in the audited project. The version argument only tells the remote script which release to install; it does not authenticate the script being executed. The installation can also target `/usr/local/bin`, and manual installation examples use `sudo`, potentially increasing the impact. ### Attack Path 1. The Agent l ...[truncated 1196 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove every `curl | bash` installation instruction. 2. Resolve and display an exact release version before downloading it. 3. Download the installer or binary to a local file without executing it: ```shell curl --proto '=https' --tlsv1.2 -fL \ -o save-to-spotify \ https://github.com/spotify/save-to-spotify/releases/download/v0.2.0/save-to-spotify-linux-amd64 ``` 4. Verify the artifact against a SHA-256 digest pinned in the reviewed Skill, not a digest downloaded from the same mutable source. 5. Prefer signed releases and verify the signature using a pinned publisher key. 6. Install into a user-owned directory such as `~/.local/bin`; do not default to `sudo` or `/usr/local/bin`. 7. Show the user the version, source URL, digest, destination, and requested privilege level before installation. 8. Include the installer source in the Skill package if its behavior is required for operation. ]]>
