T03 · Remote Payload Retrieval and Execution
Error
- Location
- scripts/quickstart.sh:6
- Finding
- Unverified Remote Script Execution Through curl-to-Bash Installation<![CDATA[ ## Vulnerability Details **File Location**: `scripts/quickstart.sh:6-8` **Vulnerability Type**: Remote payload retrieval and immediate shell execution **Risk Level**: High ### Vulnerable Code ```bash # Usage: # curl -sL https://nixus.pro/memory/install.sh | bash # -- or -- # bash skills/nix-memory/scripts/quickstart.sh ``` ### Technical Analysis The installation instructions recommend piping a response retrieved from `https://nixus.pro/memory/install.sh` directly into Bash. Although this command appears in a comment rather than being automatically executed by the packaged script, it is presented as a supported installation method. The remote installer is not included in the audited project. Its contents, update controls, and relationship to the reviewed scripts therefore cannot be verified. The command provides no version pinning, expected digest, cryptographic signature verification, or opportunity to inspect the downloaded code before execution. This behavior is unnecessary for the declared zero-dependency functionality because the package already contains local setup scripts that can be invoked directly. ### Attack Path 1. A user follows the documented `curl | bash` installation instruction. 2. The remote server, hosting account, DNS resolution, or delivery infrastructure is compromised, or the operator changes the remote installer after this package has been reviewed. 3. The endpoint returns attacker-controlled shell commands. 4. Bash executes the response immediately with the privileges of the invoking user. 5. The payload can read or modify the OpenClaw workspace and any other resources accessible to that user. ### Impact Assessment Successful exploitation provides arbitrary command execution under the invoking user's account. The potential scope includes: - Reading identity, user, agent, and memory files. - Modifying persistent OpenClaw workspace instructions. - Stealing user-accessible credentials or configuration stored else ...[truncated 361 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the `curl ... | bash` installation instruction. 2. Direct users to execute the installer shipped in the reviewed package: ```bash bash skills/nix-memory/scripts/quickstart.sh ``` 3. If remote distribution is required: - Publish immutable, versioned artifacts. - Require download to a local file rather than piping directly to a shell. - Publish a SHA-256 digest through a separate trusted channel. - Verify the digest or a cryptographic signature before execution. - Display the exact artifact version being installed. 4. Prefer a trusted package registry or signed release mechanism with reproducible source. 5. Document that installers must not be run as root. ]]>
