T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:112- Finding
Unverified Remote Installer Executed Directly by a Shell
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:112
Vulnerability Type: Remote payload retrieval and execution
Risk Level: HighVulnerable Code
bash curl -fsSL https://ollama.com/install.sh | shTechnical Analysis
The Ollama installation instructions stream a remotely hosted script directly into
sh. Although the URL appears to use Ollama's official HTTPS domain, the command does not pin a script version, verify a cryptographic checksum or signature, or give the user an opportunity to inspect the downloaded content before execution.The effective payload can change after the Skill has been reviewed. A compromise of the remote server, hosting infrastructure, domain, or TLS trust chain could therefore cause arbitrary attacker-controlled commands to execute on the user's machine. The
-fand-soptions also suppress some diagnostic output, reducing visibility when the command fails or behaves unexpectedly.Installing Ollama is relevant only to the optional local-provider path. Executing a mutable and unverified remote script is not the minimum privilege or minimum-risk mechanism necessary to provide that functionality.
Attack Path
- The user chooses the local Ollama migration option.
- The agent presents or executes the documented installation command.
- An attacker compromises or otherwise gains control over the content returned by
https://ollama.com/install.sh. curlretrieves the modified script without validating its version, checksum, or signature.- The pipe sends the response directly to
sh. - The attacker's commands execute with the privileges of the invoking user and may obtain greater privileges if the installer invokes or prompts for
sudo.
Impact Assessment
Successful exploitation permits arbitrary command execution with the invoking user's privileges. This can expose files and credentials accessible to that account, alter OpenClaw configuration, in ...[truncated 347 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the direct
curl | shpipeline. - Prefer a trusted operating-system package manager where an Ollama package is available.
- Otherwise, direct the user to download a version-pinned release artifact from the verified vendor release page.
- Verify the artifact using a vendor-published cryptographic signature or checksum obtained through an independently trusted channel.
- Save the installer locally and allow the user to inspect it before execution.
- Require explicit user confirmation before running the verified installer.
- Run installation with ordinary user privileges where possible, and request elevation only for specific operations that require it.
- Document the expected filesystem and service changes so users can evaluate the installer's scope.
A safer documented workflow should follow this pattern:
bash # Download a version-pinned artifact from the verified release page. curl -fL -o ollama-installer.sh "PINNED_VENDOR_RELEASE_URL" # Compare against the independently published expected checksum. printf '%s %s\n' "EXPECTED_SHA256" "ollama-installer.sh" | sha256sum --check - # Inspect before execution. less ollama-installer.sh # Execute only after successful verification and explicit approval. sh ollama-installer.sh- Remove the direct
