T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:108
- Finding
- Unverified Remote Installer Piped Directly into Bash<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:108` **Vulnerability Type**: `T03: Remote Payload Retrieval and Execution` **Risk Level**: Critical ### Vulnerable Code ```markdown | `FORGE_NOT_INSTALLED` | "Foundry (forge) is required but not installed." | Install: `curl -L https://foundry.paradigm.xyz \| bash && foundryup` | ``` ### Technical Analysis The suggested installation command downloads content from an external URL and passes it directly to Bash. The payload is not pinned to a version, inspected before execution, or validated with a cryptographic checksum or signature. Consequently, the code ultimately executed can change after the Skill has been reviewed. Redirect following through `curl -L` also expands the set of remote endpoints that can provide the executable response. Running `foundryup` afterward introduces another remote tool-installation stage. Installing Foundry is relevant to compiling and testing the generated Solidity project, but executing a mutable remote script immediately is not the minimum privilege or minimum trust mechanism necessary to install it. ### Attack Path 1. Forge is unavailable on the user's system. 2. The Skill presents the documented installation command. 3. The user or an automation agent runs the command. 4. `curl` retrieves the current response from `foundry.paradigm.xyz`, following redirects. 5. Bash executes the response immediately without integrity verification. 6. If the hosting service, redirect target, distribution infrastructure, or TLS trust path is compromised, attacker-controlled shell commands execute with the invoking user's privileges. 7. Those commands can access any files, credentials, environment variables, network resources, and development assets available to that user. ### Impact Assessment Successful exploitation provides arbitrary command execution under the account running the installer. The accessible scope may include: - Reading or modifying source repositories and g ...[truncated 594 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the `curl | bash` installation pipeline. 2. Pin Foundry to a reviewed, explicit release version. 3. Download the release artifact without executing it immediately. 4. Validate the artifact using a trusted, published SHA-256 checksum or cryptographic signature. 5. Display the source, version, expected checksum, and destination before installation. 6. Require explicit user approval before executing any downloaded installer. 7. Prefer a trusted package manager or manually installed, version-pinned binary where available. 8. Run installation and build operations in an isolated development container or sandbox with no production credentials. 9. Document the exact files and directories the installer is expected to create or modify. A safer workflow should separate download, verification, and execution into distinct commands rather than passing network content directly to a shell. ]]>
