T03 · Remote Payload Retrieval and Execution
- Location
setup.sh:48- Finding
Unverified Remote Installer Is Downloaded and Executed Directly
- Content
View full analysis
/dev/null; then echo "Ollama not found. Installing..." if command -v curl &> /dev/null; then curl -fsSL https://ollama.com/install.sh | sh else echo "ERROR: curl not found. Install Ollama manually from https://ollama.com" read -p "Press Enter to exit..." exit 1 fi fi ``` ### Technical Analysis The installer downloads a mutable shell script from `https://ollama.com/install.sh` and pipes the response directly into `sh`. The payload is not pinned to a version and is not authenticated through a published cryptographic signature or expected hash. The user also has no opportunity to inspect the downloaded content before execution. HTTPS provides transport protection but does not protect against compromise of the upstream server, DNS or certificate infrastructure, or the remote installation script itself. Any change to the remote response changes the code executed by an already-reviewed copy of this Skill. Installing Ollama may support the local-model workflow, but immediate execution of an unverified remote script is not the minimum privilege or minimum trust approach required for that functionality. The installer could instead require a preinstalled Ollama binary or retrieve and verify a versioned release artifact. ### Attack Path 1. An attacker compromises the upstream installer endpoint, its deployment pipeline, or another component capable of changing the response. 2. A user without an existing `ollama` executable runs `bash setup.sh`. 3. `curl` retrieves the attacker-controlled response. 4. The response is passed directly to `sh` without verification or review. 5. The payload executes with all permissions of the invoking user. 6. If the remote payload requests elevation and the us ...[truncated 454 chars]- Remediation
View remediation
