T03 · Remote Payload Retrieval and Execution
Error
- Location
- data/install.md:25
- Finding
- Unreviewed Remote Installer Execution via Shell Pipeline## Vulnerability Details **File Location**: `data/install.md`, line 25 **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical **Vulnerable Code**: ```yaml command: "curl -fsSL https://get.x-cmd.com | sh" ``` ### Technical Analysis The installation metadata defines a command that downloads shell code from a mutable external URL and sends it directly to `sh`. The downloaded content is not included in the audited project, pinned to an immutable version, or verified against a trusted digest before execution. Consequently, the code that ultimately executes can change after this Skill has been reviewed. HTTPS protects the connection in transit but does not establish that the server is currently delivering a safe installer. Compromise of the domain, hosting account, deployment pipeline, DNS infrastructure, or installer source would allow an attacker to substitute arbitrary shell commands. The guide states that downloaded components receive checksum verification, but such verification occurs after the initial remote installer has already started executing. It therefore cannot protect against a malicious initial installer. ### Attack Path 1. A user submits an archive or compression request. 2. The Skill requires the external x-cmd utility and determines that it is not installed. 3. The user or an automated consumer selects the metadata-defined auto-install command. 4. `curl` retrieves the current response from `https://get.x-cmd.com`. 5. The response is passed directly to `sh` without prior inspection or cryptographic verification. 6. A compromised endpoint returns attacker-controlled shell code. 7. The shell executes that code with the permissions and environmental access of the invoking user or Agent. ### Impact Assessment Successful exploitation provides arbitrary command execution with the privileges of the user running the installer. The remote payload could read accessible credentia ...[truncated 699 chars]
- Remediation
- ## Remediation Suggestions - Remove the direct `curl | sh` command from machine-readable installation metadata. - Prefer a trusted package manager installation using a version-pinned package. - If script-based installation is necessary: 1. Download a versioned installer to a local file. 2. Verify it against a hard-coded SHA-256 digest or a signature rooted in a trusted public key. 3. Display or review the verified script. 4. Obtain explicit user approval. 5. Execute it with an unprivileged account in a restricted environment. - Pin all downloaded artifacts to immutable release versions rather than mutable endpoints. - Ensure verification occurs before any downloaded code is interpreted. - Do not rely on post-execution checksums to establish the integrity of the initial installer.
