T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:41
- Finding
- Unverified Remote Installer Is Downloaded and Executed Directly## Vulnerability Details **File Location**: `SKILL.md`, line 41 **Vulnerability Type**: Remote payload retrieval and immediate shell execution **Risk Level**: High **Vulnerable Code**: ```bash curl -fsSL https://ollama.ai/install.sh | sh ``` ### Technical Analysis This command streams a mutable script from an external URL directly into `sh`. The effective executable payload is therefore determined at installation time rather than at Skill review time. No version pin, cryptographic signature, checksum verification, local inspection step, or content allowlist is present. Installing Ollama is relevant to the Skill's declared functionality, but executing an unverified network response is not the minimum-risk installation method. HTTPS provides transport protection but does not protect against compromise of the vendor infrastructure, domain, publishing credentials, or the installer itself. It also does not guarantee that future content at the URL matches the version reviewed during this audit. Depending on how the remote installer operates, it may modify system paths, install binaries or services, and request elevated privileges. Any malicious commands delivered by the endpoint would run with the privileges of the user invoking `sh`, including elevated privileges if the installer or user invokes `sudo`. ### Attack Path 1. An attacker compromises the installer endpoint, vendor publishing process, DNS/TLS trust path, or another component capable of controlling the returned script. 2. The user follows the Skill instructions and runs the documented command. 3. `curl` retrieves the attacker-controlled response. 4. The pipe sends the response directly to `sh` without verification or review. 5. The attacker-controlled commands execute with the invoking user's privileges. 6. If elevated authorization is available or requested, the payload may install system-wide files, services, or other persistent components. ### Impact Assessm ...[truncated 466 chars]
- Remediation
- ## Remediation Suggestions 1. Replace direct `curl | sh` execution with official manual installation instructions or a pinned release artifact. 2. Download the artifact to a local file without executing it: ```bash curl --proto '=https' --tlsv1.2 -fL -o ollama-installer.sh \ https://ollama.ai/install.sh ``` 3. Verify a vendor-published cryptographic signature or checksum obtained through an independently authenticated channel. 4. Pin the expected release version and integrity value rather than trusting mutable latest content. 5. Allow the user to inspect the downloaded script before explicitly executing it. 6. Run installation with ordinary user privileges wherever possible. Clearly identify any step requiring elevation and explain why it is necessary. 7. Prefer a trusted package manager or signed vendor package when one is available.
