T03 · Remote Payload Retrieval and Execution
Error
- Location
- references/deployment.md:7
- Finding
- Unverified Remote Installer Is Piped Directly into Bash<![CDATA[ ## Vulnerability Details **File Location**: `references/deployment.md:7-8`, `references/deployment.md:94-95`, and `references/deployment.md:111-112` **Vulnerability Type**: Remote payload retrieval and immediate execution **Risk Level**: Critical ### Vulnerable Code ```bash curl -fsSL https://raw.githubusercontent.com/NoFxAiOS/nofx/main/install.sh | bash ``` The same command is presented for initial installation, server deployment, and daily updates. ### Technical Analysis The command retrieves `install.sh` from the mutable `main` branch and sends its contents directly to Bash. The downloaded script is not included in the audited package, pinned to an immutable commit, or checked against a cryptographic hash or signature. The effective code executed by users can therefore change at any time after this Skill has been reviewed. Hosting the script on GitHub does not establish the integrity of future content. Compromise of the upstream account, repository, branch, or delivery chain could turn the documented installation command into an arbitrary code-execution mechanism. Direct piping also removes the normal review boundary that would exist if users downloaded and inspected the script before execution. ### Attack Path 1. An attacker compromises the upstream repository or obtains permission to modify `install.sh` on the `main` branch. 2. The attacker adds credential theft, persistence, destructive commands, or another malicious payload to the installer. 3. A user or AI agent follows the deployment or update instructions. 4. `curl` retrieves the attacker-controlled version. 5. Bash executes the response immediately without checksum validation or user inspection. 6. The payload receives all privileges held by the invoking user and may interact with Docker, local configuration, network services, and trading credentials. ### Impact Assessment Successful exploitation provides arbitrary command execution with the privileges of the user running the inst ...[truncated 556 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove every pipe-to-shell installation and update command. 2. Pin the installer to an immutable, reviewed commit or versioned release. 3. Download the installer to a local file rather than executing the HTTP response directly. 4. Publish and verify a SHA-256 checksum or cryptographic signature before execution. 5. Instruct users to inspect the downloaded script before running it. 6. Execute installation using an unprivileged service account where possible. 7. Document any required Docker, filesystem, network, or administrative permissions. 8. Prefer vendoring a reviewed installer in the Skill package when licensing and maintenance requirements permit it. 9. Never use an automatically changing branch for unattended daily updates. A safer workflow would resemble: ```bash curl -fLo install.sh "https://raw.githubusercontent.com/NoFxAiOS/nofx/<reviewed-commit>/install.sh" echo "<expected-sha256> install.sh" | sha256sum -c - less install.sh bash install.sh ``` ]]>
