T03 · Remote Payload Retrieval and Execution
Error
- Location
- references/install.md:17
- Finding
- Mutable Remote Installation Script Executed with Root Privileges## Vulnerability Details **File Location**: `references/install.md:17-19` **Vulnerability Type**: Remote payload retrieval and privileged execution **Risk Level**: Critical **Vulnerable code**: ```bash Or run directly: ```bash curl -fsSL https://raw.githubusercontent.com/ReScienceLab/DeClaw/main/scripts/setup-yggdrasil.sh | sudo bash ``` ### Technical Analysis The installation guide instructs users to download a shell script from the mutable `main` branch of an external GitHub repository and pipe the response directly into `sudo bash`. The fetched content is neither pinned to an immutable commit nor verified using a cryptographic signature or checksum. It is also executed without first being saved for inspection. As a result, the code that runs can change after this Skill has been reviewed. The script receives unrestricted root privileges even though the declared functionality only requires installing and configuring Yggdrasil and starting its daemon. Some installation operations may legitimately require elevation, but executing the entire unseen remote response as root exceeds least privilege. The remotely hosted setup script is not included in the audited artifact. Its exact file modifications, service installation, configuration changes, and persistence behavior therefore could not be independently verified. ### Attack Path 1. An attacker compromises the external repository, its maintainer account, or another component capable of changing the script returned by the URL. 2. The attacker modifies `scripts/setup-yggdrasil.sh` on the mutable `main` branch to include arbitrary commands. 3. A user follows the recommended installation command. 4. `curl` retrieves the altered response and streams it directly to `sudo bash`. 5. The attacker-controlled commands execute as root without integrity verification or prior inspection. 6. The payload can modify the operating system, steal accessible data, weaken security controls ...[truncated 636 chars]
- Remediation
- ## Remediation Suggestions 1. Remove the `curl | sudo bash` installation path. 2. Publish versioned releases and reference an immutable release artifact or commit rather than the mutable `main` branch. 3. Download the installer to a local file without executing it immediately. 4. Publish and require verification of a cryptographic signature and a SHA-256 checksum before execution. 5. Allow the user or administrator to inspect the downloaded script before running it. 6. Separate unprivileged download and validation from privileged installation. Elevate only the specific commands that must modify protected paths, capabilities, or service configuration. 7. Prefer signed packages distributed through trusted native package repositories where feasible. 8. Document every privileged action, including installed files, configuration changes, capabilities, services, startup behavior, listening endpoints, and uninstall procedures. 9. Pin the related Node package to a reviewed version and use a lockfile or integrity metadata so dependency installation is reproducible.
