T03 · Remote Payload Retrieval and Execution
- Location
- SKILL.md:533
- Finding
- Mutable Remote Installer Is Piped Directly into a Shell<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:533`; duplicated in `references/node-operator.md:49` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical ### Vulnerable Code ```bash curl -sSf https://grid.x402compute.cc/install.sh | sh ``` The downloaded software is subsequently configured as a persistent operating-system service: ```bash sgl service install \ --model-path ~/models/Llama-3.2-3B-Instruct-Q4_K_M.gguf \ --model-name llama-3.2-3b \ --resource-percent 50 ``` ### Technical Analysis The instructions retrieve a mutable script from an external server and execute it immediately without: - Pinning a release version or immutable artifact. - Verifying a cryptographic checksum or signature. - Saving the script for inspection. - Constraining it with a sandbox or reduced-privilege account. - Documenting the commands and files the installer modifies. Consequently, the effective code executed by the Skill can change after this repository has been reviewed. HTTPS protects transport integrity under ordinary conditions but does not protect against compromise of the service, CDN, DNS or TLS infrastructure, deployment pipeline, or publisher account. The later `sgl service install` command intentionally creates a background service that survives logout and reboot. Running a persistent inference node is within the declared provider functionality, but persistence significantly increases the consequences of an unsafe installer. ### Attack Path 1. An attacker compromises `grid.x402compute.cc`, its deployment pipeline, or the hosted `install.sh`. 2. The attacker changes the response to include arbitrary shell commands. 3. A user or Agent follows the documented `curl | sh` instruction. 4. The shell immediately executes the modified response with the invoking user's privileges. 5. The payload steals accessible files or credentials, modifies local configuration, or replaces the `sgl` binary. 6. The subsequent ...[truncated 691 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove all `curl | sh` instructions. 2. Publish versioned, immutable release artifacts through the documented source repository. 3. Download the artifact to disk before execution. 4. Publish and verify a pinned SHA-256 digest and a release signature from a separately trusted signing key. 5. Display or document the installer contents, installed paths, service definition, network endpoints, and requested privileges. 6. Run the node under a dedicated unprivileged service account with restrictive filesystem access. 7. Enable the documented sandbox by default and apply equivalent hardening on every supported operating system. 8. Require explicit confirmation before creating a persistent service and provide complete uninstall instructions. ]]>
