T03 · Remote Payload Retrieval and Execution
- Location
README.md:20- Finding
Unpinned Remote Installation Script Executed with Root Privileges
- Content
View full analysis
Vulnerability Details
File Location:
README.md, lines 20-28
Vulnerability Type: Unverified remote payload retrieval and privileged execution
Risk Level: CriticalComplete vulnerable code snippet:
bash curl -fsSL https://raw.githubusercontent.com/mattboston/sms-gateway/main/install.sh | sudo bashbash curl -fsSL -o install.sh https://raw.githubusercontent.com/mattboston/sms-gateway/main/install.sh chmod +x install.sh sudo ./install.shTechnical Analysis
The documented installation procedures download
install.shfrom the mutablemainbranch of an external GitHub repository and execute it withsudo. Neither procedure pins the payload to an immutable commit or release, and neither verifies a cryptographic checksum or signature.The first procedure pipes the network response directly into a root shell, preventing meaningful inspection before execution. The second procedure separates download and execution but still recommends running the unverified file as root. Because the remote installer is not included in the audited artifact, its effective behavior cannot be determined from this package and can change after review.
Running an installer as root may be necessary for narrowly defined operations such as installing a system service or configuring device access. However, granting unrestricted root shell execution to mutable, unverified remote content exceeds the minimum safely verifiable privilege required by the OpenClaw Skill itself.
Attack Path
- An attacker compromises the repository owner’s account, repository, release process, or another component capable of modifying the
mainbranch. - The attacker replaces or modifies
install.shwith malicious shell commands. - A user follows the installation instructions in
README.md. curlretrieves the attacker-controlled version without integrity or authenticity verification beyond transport security.- `sudo ...[truncated 834 chars]
- An attacker compromises the repository owner’s account, repository, release process, or another component capable of modifying the
- Remediation
View remediation
Remediation Suggestions
- Remove the pipe-to-shell installation command.
- Publish the installer and binary as versioned release artifacts rather than retrieving them from a mutable branch.
- Pin downloads to an immutable release version or commit identifier.
- Publish a SHA-256 checksum and require users to verify it before execution.
- Prefer cryptographic release signatures with verification against a documented maintainer key.
- Instruct users to inspect the downloaded installer before granting privileges.
- Split privileged and unprivileged installation steps. Use
sudoonly for narrowly scoped operations that require it, such as copying a reviewed binary or creating a systemd unit. - Avoid allowing the installer to run an unrestricted root shell where dedicated package-management or service-management commands can accomplish the task.
- Document the files, users, groups, device permissions, and services that installation will create or modify.
