T03 · Remote Payload Retrieval and Execution
- Location
- SKILL.md:36
- Finding
- Unverified Remote Installer Is Piped Directly into a Shell<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 36 **Vulnerability Type**: Arbitrary remote code execution through a mutable installation script **Risk Level**: Critical ### Vulnerable Code ```bash curl -L https://foundry.paradigm.xyz | bash ``` ### Technical Analysis The installation procedure downloads content from an external URL and immediately passes it to `bash`. The response is not pinned to a reviewed version, saved for inspection, or validated with a cryptographic signature or checksum. Although the referenced domain is associated with the Foundry project, transport-layer HTTPS alone does not establish that the returned script is the same script reviewed when this Skill was published. Compromise of the upstream service, distribution infrastructure, DNS resolution, certificate issuance chain, or installer account could change the effective payload after the Skill has passed review. Shell access is reasonably necessary to invoke `cast` for the declared blockchain functionality. Executing arbitrary mutable installation code, however, exceeds the minimum privilege needed to install that tool safely. ### Attack Path 1. An attacker compromises the remote installer service or another component capable of changing the response from `https://foundry.paradigm.xyz`. 2. The attacker modifies the response to include malicious shell commands. 3. A user or Agent follows Step 0 and executes the documented pipeline. 4. `bash` executes the attacker-controlled response without integrity validation or review. 5. The payload runs with the privileges of the user operating the Agent. 6. It can inspect local files and environment variables, including wallet credentials such as `TILT_PRIVATE_KEY` if already configured, modify tools, or establish persistence. ### Impact Assessment Successful exploitation provides arbitrary command execution with the current user's privileges. Depending on the execution environment, this may allow: - Theft of wal ...[truncated 488 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the `curl | bash` installation pipeline. 2. Pin Foundry to a specific reviewed release rather than retrieving a mutable installer. 3. Download the release artifact to a newly created temporary directory with restrictive permissions. 4. Verify the artifact using an official cryptographic signature or a SHA-256 checksum obtained through a separately authenticated release channel. 5. Abort installation if verification fails. 6. Display the exact version and source being installed. 7. Prefer a trusted operating-system package manager where an appropriate verified package is available. 8. Run installation without elevated privileges and avoid invoking `sudo`. 9. Recommend installing prerequisites before loading the Skill, so wallet-bearing Agent sessions do not also perform dependency installation. A safer workflow should follow this pattern: ```bash # Illustrative only: use checksum and URL values from an authenticated release. curl --fail --show-error --location \ --output /tmp/foundry-release.tar.gz \ "https://official.example/foundry/PINNED_VERSION/foundry-release.tar.gz" printf '%s %s\n' "EXPECTED_SHA256" "/tmp/foundry-release.tar.gz" | sha256sum --check - # Extract and install only after successful verification. ``` ]]>
