T03 · Remote Payload Retrieval and Execution
- Location
- references/lighthouse-app-deploy.md:235
- Finding
- Mutable Remote Installation Scripts Executed Directly as Root<![CDATA[ ## Vulnerability Details **File Location**: `references/lighthouse-app-deploy.md:235-272` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical ### Vulnerable Code ```bash $SSH ' # Install Docker when the Docker CE image is not used curl -fsSL https://get.docker.com | sh systemctl enable docker && systemctl start docker # Pull and run the application docker run -d --name app --restart=always -p 80:8080 <image> ' ``` ```bash $SSH ' # Install Node.js through NodeSource curl -fsSL https://deb.nodesource.com/setup_20.x | bash - apt install -y nodejs cd /opt/app npm install npm run build ' ``` ### Technical Analysis The deployment guide downloads shell scripts from external URLs and pipes their contents directly into `sh` or `bash`. The effective scripts are mutable external payloads and are not included in the reviewed Skill package. No version pinning, detached-signature verification, checksum verification, or local inspection is performed before execution. These commands run through the guide's root SSH session, so every instruction returned by either endpoint receives unrestricted operating-system privileges. The domains appear related to the declared Docker and Node.js installation tasks, and there is no evidence that the current endpoints are intentionally malicious. Nevertheless, this delivery pattern allows the effective behavior to change after Skill review and therefore constitutes a remote payload execution vulnerability. ### Attack Path 1. A user asks the agent to deploy a Docker or Node.js application. 2. The Skill directs the agent to follow `references/lighthouse-app-deploy.md`. 3. The agent establishes a remote SSH session as `root`. 4. The agent retrieves a mutable installation script from `get.docker.com` or `deb.nodesource.com`. 5. The downloaded bytes are immediately passed to a privileged shell without integrity validation. 6. If the upstream service, distribution infrastructure, DNS resolu ...[truncated 861 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove all `curl | sh` and `curl | bash` installation patterns. 2. Prefer distribution-maintained packages from explicitly configured, authenticated repositories. 3. If a vendor installer is unavoidable: - Pin an immutable installer version or commit. - Download it to a local file without executing it. - Verify a hard-coded cryptographic checksum or an official detached signature. - Review the downloaded script before execution. - Execute it only after explicit user confirmation. 4. Run installation with the minimum privileges required rather than placing the entire deployment session under `root`. 5. Record the verified artifact version and expected digest in the Skill documentation. 6. Prefer a prebuilt, trusted Docker CE image when Docker is required. 7. For Node.js, use a signed repository configuration or a version manager with verified release artifacts rather than executing a repository setup script directly. ]]>
