T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:21
- Finding
- Unpinned Remote Installer Scripts Are Piped Directly to a Shell<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:21-35`; duplicated in `README.md:23-37` **Vulnerability Type**: Remote payload retrieval and immediate execution **Risk Level**: High ### Vulnerable Code ```bash # Install Ollama curl -fsSL https://ollama.com/install.sh | sh ollama pull glm-ocr:q8_0 # Install poppler-utils (for PDF to image conversion) sudo apt install poppler-utils # Debian/Ubuntu brew install poppler # macOS # Install uv package manager curl -LsSf https://astral.sh/uv/install.sh | sh ``` ### Technical Analysis The installation instructions pipe responses from mutable external URLs directly into `sh`. The downloaded content is not pinned to a version, saved for inspection, checked against a cryptographic hash, or verified using a digital signature. Installing Ollama and `uv` is relevant to the declared OCR functionality, but immediate remote-script execution is not the minimum privilege or safest mechanism necessary to install those dependencies. The effective code executed by the user can change after the Skill package has been reviewed. Although the referenced domains appear related to the declared software, their apparent legitimacy does not eliminate the risk. Compromise of the remote publication process, hosting account, DNS resolution, certificate trust chain, or upstream infrastructure could turn these commands into arbitrary code execution. The similar commands in `hooks/post-install.sh:10-14` and `hooks/install-deps.sh:37-42` are only printed as recommendations and are not themselves piped to a shell by those hooks. The directly executable commands in the documentation remain dangerous because installation instructions are part of the Skill's operational behavior. ### Attack Path 1. An attacker compromises an installer publication account, hosting endpoint, or relevant network trust dependency. 2. The response served by `https://ollama.com/install.sh` or `https://astral.sh/uv/install.sh` is modifie ...[truncated 843 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove all `curl | sh` installation instructions from `SKILL.md` and `README.md`. 2. Prefer signed operating-system packages or documented package-manager commands. 3. If a standalone installer is unavoidable: - Pin a specific released version. - Download it as a separate file. - Verify a publisher signature or a checksum committed in the reviewed Skill package. - Display or inspect the downloaded script before execution. - Execute it without administrative privileges unless a specific operation requires elevation. 4. Document the exact expected source repository and publisher identity. 5. Use reproducible installation instructions so the audited payload cannot change independently of the Skill version. A safer pattern is: ```bash curl -fL -o installer.sh "https://example.invalid/releases/vX.Y.Z/installer.sh" echo "<audited-sha256> installer.sh" | sha256sum --check - sh installer.sh ``` The version and checksum must be obtained from an independently authenticated, reviewed release record rather than from the same mutable endpoint. ]]>
