T03 · Remote Payload Retrieval and Execution
- Location
- docs/02-installation.md:30
- Finding
- Unverified Remote Installation Scripts Are Executed Directly by Shell Interpreters## Vulnerability Details **File Location**: `docs/02-installation.md:30-46, 80-92, 113-125, 148, 186-195, 405, 898, 1269-1278`; operationalized by the verbatim reproduction requirements in `SKILL.md:25-29, 260-273` **Vulnerability Type**: Remote payload retrieval and immediate execution **Risk Level**: High ### Vulnerable Code ```sh curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install.sh | bash ``` ```sh curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install.sh | bash -s -- --help ``` ```sh curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install-cli.sh | bash ``` ```sh curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install-cli.sh | bash -s -- --help ``` ```powershell iwr -useb https://openclaw.ai/install.ps1 | iex ``` ```sh curl -fsSL https://raw.githubusercontent.com/openclaw/openclaw-ansible/main/install.sh | bash ``` ```dockerfile RUN curl -fsSL https://bun.sh/install | bash ``` ```sh curl -fsSL https://openclaw.ai/install.sh | bash -s -- --install-method git --no-onboard ``` ### Technical Analysis These commands retrieve mutable content from external URLs and pass it directly to `bash`, `sh`, or PowerShell's `Invoke-Expression`. The downloaded payload is not saved for review and is not authenticated through an artifact signature, pinned commit, immutable release identifier, or expected checksum. HTTPS provides transport protection but does not guarantee that the remote publisher, hosting account, DNS configuration, distribution infrastructure, or future script revisions will remain trustworthy. If any relevant endpoint is compromised, the effective payload can change after this Skill package has been reviewed. The exposure is amplified by `SKILL.md`, which instructs the agent not to paraphrase documentation code and to reproduce exact commands. Consequently, a user asking for installation help may receive an immediately executable command ...[truncated 1377 chars]
- Remediation
- ## Remediation Suggestions 1. Replace direct execution pipelines with a download, verification, inspection, and execution workflow. 2. Publish installation scripts as immutable, versioned release artifacts. 3. Publish SHA-256 checksums through an independently protected channel and verify them before execution. 4. Prefer cryptographic signatures with documented trusted signing keys. 5. Pin GitHub-hosted content to a full commit hash instead of a mutable branch such as `main`. 6. Replace PowerShell `Invoke-Expression` with a locally downloaded, signature-verified script. 7. For container builds, pin scripts and base dependencies to immutable versions so builds remain reproducible. 8. Amend `SKILL.md` so exact reproduction is subordinate to security review. The Skill should warn users and provide a verified alternative rather than automatically presenting `curl | sh` or `iwr | iex`. 9. Run installers under the least-privileged account possible and require explicit confirmation before service installation or privilege elevation. A safer general pattern is: ```sh curl -fL --proto '=https' --tlsv1.2 \ -o install.sh \ 'https://example.invalid/releases/vX.Y.Z/install.sh' printf '%s %s\n' 'PUBLISHED_SHA256' 'install.sh' | sha256sum --check - less install.sh bash install.sh ``` The placeholder URL, release, and checksum must be replaced with publisher-provided immutable values.
