T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:36
- Finding
- Unverified Remote Script Is Piped Directly into Bash<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 36-37 **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High ### Vulnerable Code ```bash curl -L https://foundry.paradigm.xyz | bash foundryup ``` ### Technical Analysis The installation instructions pipe content retrieved from an external URL directly into Bash. The effective payload is mutable after the Skill has been reviewed because no release version, artifact digest, or cryptographic signature is pinned or verified. Although the URL uses HTTPS and appears to be an official Foundry distribution endpoint, this pattern relies completely on the ongoing integrity of the domain, its redirect chain, DNS and TLS infrastructure, and the remote distribution service. The `-L` option also follows redirects without requiring the final destination to be reviewed. Any code returned by that request executes immediately with the current user's privileges. This behavior is not required for the Skill's swap functionality. Foundry can instead be installed from a pinned, independently verified release artifact. ### Attack Path 1. An attacker compromises the distribution endpoint, one of its redirect destinations, or relevant delivery infrastructure. 2. The endpoint returns a modified shell script. 3. A user follows the documented prerequisite installation command. 4. `curl` supplies the modified response directly to Bash. 5. The malicious script executes with the user's privileges. 6. It can access resources available to that user, potentially including wallet environment variables, API credentials, local files, and shell configuration. ### Impact Assessment Successful exploitation provides arbitrary code execution under the account running the command. Because the Skill expects `PRIVATE_KEY` and `UNISWAP_API_KEY` environment variables, execution in the same operational environment may expose wallet-signing authority and API credentials. The payload could also modify ...[truncated 237 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the `curl | bash` installation pipeline. 2. Pin a specific Foundry release and download its artifact from the official release repository. 3. Verify the artifact against a trusted, published SHA-256 checksum and, where available, a cryptographic signature. 4. Require the user to inspect or extract the downloaded artifact before executing any installer. 5. Avoid silently following arbitrary redirects, or verify that the final download origin is on an explicit allowlist. 6. Document installation in an isolated, unprivileged environment and explicitly warn users not to run the installer as root. 7. Pin and verify the resulting `cast` version before using it for wallet operations. ]]>
