T03 · Remote Payload Retrieval and Execution
Error
- Location
- scripts/onboard.py:208
- Finding
- Unsafe Remote Installer Executed Through a curl-to-Shell Pipeline<![CDATA[ ## Vulnerability Details **File Location**: `scripts/onboard.py:208-214` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High ### Vulnerable Code ```python forge_check = subprocess.run(["forge", "--version"], capture_output=True, text=True) if forge_check.returncode != 0: print(" ⚠️ Foundry (forge) not installed. Cannot deploy treasury.") print(" 💡 Install: curl -L https://foundry.paradigm.xyz | bash && foundryup") return None ``` ### Technical Analysis When Foundry is unavailable, the script instructs the user to pipe a mutable remote HTTP response directly into Bash. Although the Python script does not automatically execute the displayed command, it presents the command as the recommended installation procedure during a security-sensitive wallet and smart-contract deployment workflow. A `curl | bash` pipeline provides no opportunity to inspect the downloaded installer and performs no checksum, version pinning, or signature verification. The effective code executed by the user can change after the Skill has been audited. Trust in the current domain owner does not eliminate risks from infrastructure compromise, account compromise, DNS or certificate failures, or future changes to the remote installer. ### Attack Path 1. The user runs the onboarding script on a system where `forge` is unavailable. 2. The script displays the remote installation pipeline as the solution. 3. The user copies and executes the command. 4. Bash immediately executes whatever content the remote endpoint returns at that time. 5. If the endpoint or its delivery infrastructure has been compromised, the payload runs with the user's privileges. 6. The payload can access the OpenClaw workspace, wallet configuration, environment variables, and other files available to that user. ### Impact Assessment Successful exploitation provides arbitrary code execution under the account running the installer. Because onboarding uses an Ethere ...[truncated 450 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Remove the `curl | bash` recommendation. - Direct users to an official, versioned Foundry release and pin the expected version. - Download the installer or release artifact to a local file rather than executing it directly. - Verify a published cryptographic signature or SHA-256 checksum before execution. - Allow the user to inspect the downloaded content before running it. - Keep dependency installation separate from the wallet onboarding process. - Prefer operating-system package managers or signed release artifacts where available. - Document the exact source, version, checksum, and verification procedure. ]]>
