T03 · Remote Payload Retrieval and Execution
Error
- Location
- tools/SKILL.md:24
- Finding
- Unverified Remote Foundry Installer Is Piped Directly into Bash<![CDATA[ ## Vulnerability Details **File Location**: `tools/SKILL.md:24-27` **Vulnerability Type**: Remote payload retrieval and immediate shell execution **Risk Level**: High ### Vulnerable Code ```bash # Install Foundry curl -L https://foundry.paradigm.xyz | bash foundryup ``` ### Technical Analysis The installation instruction downloads mutable content from an external URL and pipes it directly into Bash. The response is not saved for inspection, pinned to a specific version, or validated using a cryptographic signature or checksum. The domain is presented as Foundry's installer source, and installing Foundry is consistent with the Skill's declared development-tooling purpose. Nevertheless, the command creates a remote code-execution channel: whatever content the endpoint returns at execution time receives the invoking user's shell privileges. This exceeds the minimum privilege necessary to document or install the tool because safer release-artifact and verification workflows are available. ### Attack Path 1. An attacker compromises the installer host, its deployment pipeline, DNS resolution, or another component capable of changing the HTTPS response. 2. The attacker modifies the returned installer script to include malicious shell commands. 3. A user or AI agent follows the Skill and runs the documented command. 4. Bash immediately executes the response without providing an opportunity to inspect or authenticate it. 5. The payload accesses files and credentials available to the invoking account or modifies that account's environment. ### Impact Assessment Successful exploitation provides arbitrary command execution with the privileges of the user running the installation command. In the documented blockchain-development environment, that scope may include: - Wallet private keys exposed through environment variables or local configuration. - Deployment credentials and RPC provider tokens. - Source code and contract deployment artifacts. - Modific ...[truncated 370 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Do not pipe network responses directly into a shell. 2. Select and pin a reviewed Foundry release version. 3. Download the release artifact into a temporary directory without executing it. 4. Verify a publisher-provided cryptographic signature or a checksum obtained through an independently authenticated channel. 5. Inspect the downloaded file and execute it only after validation. 6. Run installation under an unprivileged, dedicated development account. 7. Keep wallet keys and production credentials out of the environment during tool installation. A safer conceptual workflow is: ```bash curl --fail --show-error --location \ --output foundry-installer.sh \ "https://reviewed.example/foundry-installer-VERSION.sh" printf '%s %s\n' 'PINNED_SHA256' 'foundry-installer.sh' | sha256sum --check - less foundry-installer.sh bash foundry-installer.sh ``` The actual artifact URL and checksum must come from authenticated official release metadata; placeholder values must not be used. ]]>
