T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:42- Finding
Unverified Mutable Remote Installer Executed Directly by Shell
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 42
Vulnerability Type: Remote payload retrieval and execution
Risk Level: HighComplete Code Snippet:
bash sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattendedTechnical Analysis
The installation instruction downloads a shell script from the mutable
masterbranch of the Oh My Zsh repository and immediately executes its contents withsh. It does not pin the payload to a reviewed commit or release and performs no checksum or signature verification. Consequently, the code executed at installation time may differ from the code assessed during this audit.Although the URL points to the official Oh My Zsh GitHub organization and installing Oh My Zsh is consistent with the Skill's terminal-customization purpose, direct execution of mutable remote content is not the minimum-risk mechanism necessary to provide that functionality. The
--unattendedoption also suppresses interactive installation prompts, reducing the user's opportunity to inspect or reject unexpected actions.Attack Path
- An attacker compromises the upstream repository, a maintainer account, or another component capable of altering the script served from the referenced mutable branch.
- The attacker adds malicious shell commands to the remote installer.
- A user or agent follows the Skill and runs the documented installation command.
curlretrieves the current attacker-controlled script without integrity verification.- Command substitution passes the downloaded content directly to
sh. - The malicious commands execute with the permissions of the user running the Skill.
Impact Assessment
A substituted installer could obtain arbitrary user-level code execution. It could read or modify files accessible to the invoking account, alter shell configuration and startup files, access environment varia ...[truncated 399 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the installer to a specific, reviewed commit rather than the mutable
masterbranch. - Download the installer to a local file instead of piping or substituting it directly into a shell.
- Verify its SHA-256 checksum against an independently trusted expected value or validate a cryptographic signature.
- Allow the user to inspect the downloaded script before execution.
- Avoid unattended execution unless automation is explicitly required and all resulting file changes are documented.
- Prefer a trusted package-manager package or another installation method with version pinning and integrity controls where available.
- Run the installer as an ordinary user and do not add
sudoor other privilege-escalation mechanisms.
A safer pattern is:
bash curl -fL \ -o /tmp/ohmyzsh-install.sh \ "https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/<PINNED_COMMIT>/tools/install.sh" echo "<EXPECTED_SHA256> /tmp/ohmyzsh-install.sh" | shasum -a 256 -c - less /tmp/ohmyzsh-install.sh sh /tmp/ohmyzsh-install.sh --unattended rm -f /tmp/ohmyzsh-install.shThe pinned commit and expected digest must be supplied from trusted, reviewed sources.
- Pin the installer to a specific, reviewed commit rather than the mutable
