T03 · Remote Payload Retrieval and Execution
Error
- Location
- scripts/joule.sh:327
- Finding
- Unverified Remote Installer Piped Directly into a Shell<![CDATA[ ## Vulnerability Details **File Location**: `scripts/joule.sh:327-331` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High ### Vulnerable Code ```bash warn "foundry/cast not installed — cannot sign transaction" echo "" echo " Install foundry for on-chain voting:" echo " curl -L https://foundry.paradigm.xyz | bash" echo " foundryup" ``` ### Technical Analysis The CLI recommends downloading mutable content from an external URL and piping it directly into Bash. Although the project only prints this instruction rather than executing it automatically, users are explicitly directed to run the command when the `cast` dependency is unavailable. The downloaded script is not pinned to a version and is not verified using a cryptographic checksum or signature. Its effective behavior can therefore change after this Skill has been reviewed. Compromise of the remote endpoint, distribution infrastructure, DNS or TLS trust chain could cause arbitrary commands to execute with the invoking user's privileges. Installing Foundry is relevant to the intended on-chain voting feature, but direct `curl | bash` execution exceeds the minimum safe privilege and supply-chain requirements for dependency installation. ### Attack Path 1. A user invokes on-chain voting while `cast` is unavailable. 2. The CLI displays the `curl -L https://foundry.paradigm.xyz | bash` instruction. 3. The user copies and executes the suggested command. 4. A compromised or malicious remote response is passed directly to Bash. 5. The remote payload executes with the user's account privileges. 6. The payload could access local files, wallet configuration, environment variables, or other credentials available to that user. ### Impact Assessment Successful exploitation permits arbitrary code execution under the invoking user's privileges. This may expose Moltbook credentials, wallet-related environment variables, local configuration, source code, SSH credentia ...[truncated 138 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Remove the `curl | bash` installation instruction. - Direct users to an official package manager or versioned release. - Download the installer or binary as a separate step without executing it immediately. - Pin the dependency to a reviewed release version. - Verify the downloaded artifact against a publisher-provided cryptographic signature or checksum. - Use a temporary directory with restrictive permissions for downloaded artifacts. - Require an explicit user confirmation after displaying the source, version, checksum, and requested installation scope. - Prefer a hardware-wallet or documented package-manager workflow that does not require installing mutable remote shell code. ]]>
