T03 · Remote Payload Retrieval and Execution
Error
- Location
- references/local-providers.md:7
- Finding
- Unverified Remote Installation Script Is Piped Directly Into a Shell<![CDATA[ ## Vulnerability Details **File Location**: `references/local-providers.md:7-13` **Vulnerability Type**: `T03: Remote Payload Retrieval and Execution` **Risk Level**: High ### Vulnerable Code ```bash **Install** ```bash # macOS brew install ollama # Linux curl -fsSL https://ollama.ai/install.sh | sh ``` ``` The security-sensitive command is: ```bash curl -fsSL https://ollama.ai/install.sh | sh ``` ### Technical Analysis The Linux installation instructions download mutable content from an external URL and immediately execute it with `sh`. The user is not given an opportunity to inspect the script, and the command does not pin a release, verify a cryptographic signature, or compare a published checksum. HTTPS protects the connection in ordinary circumstances but does not protect against compromise of the provider, its hosting infrastructure, DNS or certificate ecosystem, or the remote installation script itself. Because the effective payload can change after the Skill has been audited, the package's reviewed source does not fully define the code users are instructed to execute. This behavior is unnecessary for the Skill's core routing functionality. The Skill metadata only declares `python3` as required, while Ollama is one optional local provider among several. Recommending immediate remote execution therefore increases the supply-chain and code-execution scope beyond the minimum privileges needed by the Skill. ### Attack Path 1. An attacker compromises the installation endpoint, its deployment pipeline, or another component capable of modifying the script returned by `https://ollama.ai/install.sh`. 2. The attacker inserts commands into the remotely served script. 3. A user follows the documented Linux installation command. 4. `curl` retrieves the attacker's current payload and streams it directly to `sh`. 5. The payload executes with all privileges available to the invoking user. 6. The payload can read, modify, or delete data accessible to ...[truncated 789 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the direct `curl | sh` instruction. 2. Prefer an official, version-pinned operating-system package or repository with normal package-signing verification. 3. If a script-based installation must be documented: - Download the script to a local file. - Pin an immutable release URL where available. - Obtain the expected SHA-256 checksum or signature through a separately authenticated channel. - Verify the checksum or signature before execution. - Instruct the user to inspect the downloaded script. - Execute it only after explicit user approval. 4. Clearly state what files, services, users, groups, and network listeners the installer creates. 5. Avoid recommending elevated execution unless a particular operation strictly requires it, and document that operation separately. 6. Present optional providers as optional dependencies rather than prerequisites for the Python routing utilities. ]]>
