T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:80
- Finding
- Unverified Remote Installer Executed Through a Shell Pipeline<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 80 **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High ### Vulnerable Code ```bash # Check if fly CLI is installed which fly || curl -L https://fly.io/install.sh | sh ``` ### Technical Analysis When the `fly` executable is unavailable, this instruction downloads the current contents of `https://fly.io/install.sh` and pipes them directly into `sh`. The downloaded payload is not version-pinned, cryptographically verified, stored for inspection, or reviewed before execution. Although the URL uses HTTPS and refers to Fly.io's declared domain, the effective installer is external to the audited project and can change after the Skill has been reviewed. HTTPS protects transport under ordinary conditions, but it does not protect against compromise of the upstream server, publication process, domain, or installer itself. Installing a deployment CLI is related to the Skill's declared purpose, but immediate execution of mutable remote code exceeds the minimum privilege and trust necessary to perform that installation. ### Attack Path 1. A user asks the Agent to deploy a project to Fly.io. 2. The Agent follows the Skill instructions and checks for the `fly` executable. 3. The executable is not present, causing the fallback command to run. 4. The Agent retrieves the current remote installer from `fly.io`. 5. The response body is passed directly to `sh` without validation. 6. If the upstream source or delivery chain has been compromised, attacker-controlled shell commands execute with the privileges of the Agent process. ### Impact Assessment A malicious installer could execute arbitrary commands under the Agent user's account. Depending on that account's existing permissions, it could read or modify accessible project files, source code, deployment configuration, environment variables, authentication material, and user-level configuration. It could also invoke avai ...[truncated 360 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the direct `curl | sh` installation pattern. 2. Require explicit user approval before installing any new system or user-level tool. 3. Download a specific, reviewed Fly CLI release rather than a mutable installer endpoint. 4. Pin the expected version and verify a vendor-published cryptographic checksum or signature before execution. 5. Store the downloaded artifact temporarily so its source, type, permissions, and digest can be validated. 6. Prefer an official package manager or a documented release binary installed into an isolated, user-controlled directory. 7. Run installation and deployment under a dedicated least-privileged account or isolated environment. 8. If verification cannot be completed, stop and provide manual installation instructions rather than executing the payload. ]]>
