T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:24- Finding
Remote Installation Scripts Executed Without Integrity Verification
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:24-25
Vulnerability Type: Remote payload retrieval and execution
Risk Level: HighVulnerable code:
bash curl -fsSL https://x.ai/cli/install.sh | bash irm https://x.ai/cli/install.ps1 | iexTechnical Analysis
The installation instructions download mutable remote content and execute it immediately in a local shell. The Unix command pipes the HTTP response directly to Bash, while the PowerShell command passes the downloaded response to
Invoke-Expression. Neither procedure pins a release, verifies a cryptographic signature or checksum, nor gives the user an opportunity to inspect the script before execution.The URL is hosted on the stated first-party HTTPS domain, which reduces but does not eliminate risk. The effective installer is not present in this project and may change after the Skill has been reviewed. Compromise of the hosting infrastructure, DNS or TLS trust path, publication credentials, or installer delivery process could therefore turn the documented installation procedure into arbitrary code execution.
Installing the declared CLI is consistent with the Skill's purpose. However, executing streamed remote content is not required to provide that functionality and exceeds the minimum safe installation behavior. The script receives all permissions held by the invoking account; if the command is run with elevated privileges, the payload receives those elevated privileges as well.
Attack Path
- An attacker compromises the installer hosting or publication channel, or otherwise causes
https://x.ai/cli/install.shor its PowerShell equivalent to return attacker-controlled content. - A user or automation system follows the instructions in
SKILL.md. curlorInvoke-RestMethodretrieves the modified script.- Bash or
Invoke-Expressionexecutes the response immediately, without integrity validation or prior inspection. - The ...[truncated 789 chars]
- An attacker compromises the installer hosting or publication channel, or otherwise causes
- Remediation
View remediation
Remediation Suggestions
- Do not pipe downloaded content directly into Bash or
Invoke-Expression. - Prefer a trusted package manager or a signed, versioned release binary from the official release channel.
- Pin the installer or artifact to a specific immutable release version rather than a mutable installation endpoint.
- Download the artifact to a local file before execution so it can be inspected:
bash curl -fL -o install.sh https://example.invalid/path/to/versioned/install.sh - Publish and verify a cryptographic signature using a separately distributed, pinned public key. If signatures are unavailable, verify a release-specific SHA-256 checksum obtained through an independently protected channel.
- Execute the verified installer explicitly and without elevated privileges unless a documented installation step strictly requires elevation.
- Document the files, directories, network endpoints, and permissions used by the installer so users can assess its effects.
- Apply equivalent controls to the PowerShell installation path; avoid
Invoke-Expressionand use a signed, downloaded script with an appropriate execution policy after verification.
- Do not pipe downloaded content directly into Bash or
