T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:521
- Finding
- Mutable Remote Foundry Installer Is Piped Directly into a Shell## Vulnerability Details **File Locations**: - `SKILL.md:521-524` - `references/testing-guide.md:9-12` - `references/toolchain-guide.md:49-52` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical **Vulnerable Code**: `SKILL.md:521-524` ```bash # Installation curl -L https://foundry.paradigm.xyz | bash foundryup ``` `references/testing-guide.md:9-12` ```bash # Install Foundry curl -L https://foundry.paradigm.xyz | bash foundryup ``` `references/toolchain-guide.md:49-52` ```bash # Installation curl -L https://foundry.paradigm.xyz | bash foundryup ``` ### Technical Analysis Each instruction retrieves mutable content from an external URL and sends the response directly to `bash`. The user cannot inspect the retrieved installer before execution, and the command provides no version pinning, checksum validation, signature verification, or content allowlisting. The `-L` option follows redirects, which means the final executable response may originate from a different endpoint. HTTPS protects the connection to the responding server but does not protect against compromise of the domain, hosting account, redirect destination, CDN, or release process. It also does not ensure that the installer remains identical to the version reviewed during this audit. Installing Foundry is relevant to the Skill's testing functionality. However, executing mutable remote content directly in a shell is not the minimum privilege or minimum-risk method necessary to install it. ### Attack Path 1. An attacker compromises the installer domain, hosting infrastructure, redirect destination, or content delivery process. 2. The attacker replaces the legitimate response with a malicious shell script. 3. A user follows one of the documented installation procedures. 4. `curl` downloads the attacker-controlled response and follows any configured redirects. 5. `bash` immediately executes the r ...[truncated 771 chars]
- Remediation
- ## Remediation Suggestions 1. Remove all instances of `curl ... | bash`. 2. Pin installation instructions to a specific reviewed Foundry release. 3. Download the release artifact separately from the project's documented release repository. 4. Verify a publisher-provided cryptographic signature or checksum before extraction or execution. 5. Display and inspect installer content before running it when a packaged release is unavailable. 6. Perform installation under a non-administrative account and avoid `sudo`. 7. Document the expected downloaded filename, checksum, destination paths, and permissions. 8. Prefer a reproducible container image or other isolated tool environment. 9. Keep all three installation examples synchronized so an unsafe command is not retained in a secondary guide. A safer conceptual workflow is: ```bash # Download a specifically pinned release artifact. curl --fail --proto '=https' --tlsv1.2 \ --output foundry-release.tar.gz \ 'https://trusted-release-location.example/foundry/PINNED_VERSION/foundry-release.tar.gz' # Compare against a separately authenticated, publisher-provided checksum. sha256sum --check foundry-release.tar.gz.sha256 # Extract only after successful verification. tar -xzf foundry-release.tar.gz ``` The actual release URL, version, checksum, and signature process must come from verified upstream release documentation rather than placeholders.
