T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:222
- Finding
- Unverified Foundry Installer Executed from a Mutable Remote Source<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:222-229` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical ### Vulnerable Code ```bash **3a — Check Foundry `cast`** ```bash if ! command -v cast > /dev/null 2>&1; then echo "Foundry cast not found. Install it with:" echo " curl -L https://foundry.paradigm.xyz | bash && foundryup" echo "Then restart this session." exit 1 fi ``` ### Technical Analysis The installation command pipes an HTTP response directly into `bash`. Although the referenced domain is associated with Foundry, the downloaded payload is mutable and is neither version-pinned nor authenticated with a checksum or release signature. The command therefore delegates arbitrary shell execution to the current contents of the remote endpoint. The effective code can change after the Skill has been reviewed. A compromise of the distribution endpoint, its deployment process, DNS resolution, or the TLS trust path could turn this instruction into arbitrary local code execution. This behavior is not required at the minimum privilege level necessary to detect that Foundry is unavailable. The Skill can instead direct the operator to a pinned release artifact and require integrity verification before installation. ### Attack Path 1. The Skill detects that `cast` is unavailable and displays the installation command. 2. The operator copies and runs the command as instructed. 3. `curl` downloads the current response from the remote installer endpoint. 4. The response is passed directly to `bash` without local inspection or integrity validation. 5. A compromised or malicious response executes with all privileges of the invoking account. 6. The payload can access local files, API credentials, wallet material available to the process, or install additional persistent components. ### Impact Assessment Successful exploitation provides arbitrary command execution as the invoking user. Because this Skil ...[truncated 485 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Remove all `curl | bash` installation instructions. - Pin an audited Foundry release version rather than using a mutable installer channel. - Download the release artifact to a temporary file before execution. - Verify a vendor-provided cryptographic signature or a hard-coded SHA-256 checksum. - Use a temporary directory created with restrictive permissions and delete it after installation. - Present the artifact and verification result to the operator before executing anything. - Perform installation under an unprivileged account and avoid `sudo` unless separately justified. - Prefer the operating system package manager or an internally mirrored and approved artifact repository. ]]>
