[GH-ISSUE #5338] The main shell script runner for ollama downloader doesn't check for hash #49853

Open
opened 2026-04-28 13:12:53 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @Ahmed on GitHub (Jun 27, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/5338

What is the issue?

Hi team:

You have this ollama installer on the main website.

curl -fsSL https://ollama.com/install.sh | sh

If someone hacked into the website, and change the script, the end user would never know. You should bake the checksum into the downloader to make sure the installer is not modified.

Something like this would work:

tmpfile=$(mktemp) && curl -fsSL -o "$tmpfile" https://ollama.com/install.sh && echo "2ecc4a9a5afd2f43ac474b59d3be5d81189cc79ca87bd29ed91e0e089a18c765  $tmpfile" | sha256sum -c - && sh "$tmpfile" && rm -f "$tmpfile"

Also, you will need to publish the checksum of the installer on github too. If you think this issue is not a big deal, take a look at this: https://www.howtogeek.com/devops/codecov-hacked-what-to-do-now-if-you-use-codecov/

OS

No response

GPU

No response

CPU

No response

Ollama version

No response

Originally created by @Ahmed on GitHub (Jun 27, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/5338 ### What is the issue? Hi team: You have this ollama installer on the main website. ``` curl -fsSL https://ollama.com/install.sh | sh ``` If someone hacked into the website, and change the script, the end user would never know. You should bake the checksum into the downloader to make sure the installer is not modified. Something like this would work: ``` tmpfile=$(mktemp) && curl -fsSL -o "$tmpfile" https://ollama.com/install.sh && echo "2ecc4a9a5afd2f43ac474b59d3be5d81189cc79ca87bd29ed91e0e089a18c765 $tmpfile" | sha256sum -c - && sh "$tmpfile" && rm -f "$tmpfile" ``` Also, you will need to publish the checksum of the installer on github too. If you think this issue is not a big deal, take a look at this: https://www.howtogeek.com/devops/codecov-hacked-what-to-do-now-if-you-use-codecov/ ### OS _No response_ ### GPU _No response_ ### CPU _No response_ ### Ollama version _No response_
GiteaMirror added the bug label 2026-04-28 13:12:53 -05:00
Author
Owner

@tredondo commented on GitHub (Oct 20, 2025):

I noticed this issue too. This is a significant vulnerability.

The official Ollama installation script for Linux (install.sh) downloads and extracts tarballs (e.g., ollama-linux-${ARCH}.tgz, JetPack/ROCm bundles) directly via curl piped to tar with elevated privileges (sudo), without performing any integrity checks such as SHA256 hash verification or signature validation. This occurs in multiple places, including the main bundle download and GPU-specific extras (but let's focus on the main bundle download).

Successful exploitation could compromise the entire system, as the extracted binaries (Ollama daemon) run persistently via systemd.

Please provide a SHA256SUMS file (or similar) on https://ollama.com/download alongside the tarballs, signed with a public GPG key if possible, and amend the install script to verify the checksums.

<!-- gh-comment-id:3422778225 --> @tredondo commented on GitHub (Oct 20, 2025): I noticed this issue too. This is a significant vulnerability. The official Ollama installation script for Linux (install.sh) downloads and extracts tarballs (e.g., `ollama-linux-${ARCH}.tgz`, `JetPack/ROCm` bundles) directly via curl piped to tar with elevated privileges (sudo), without performing any integrity checks such as SHA256 hash verification or signature validation. This occurs in multiple places, including the main bundle download and GPU-specific extras (but let's focus on the main bundle download). **Successful exploitation could compromise the entire system, as the extracted binaries (Ollama daemon) run persistently via systemd.** Please provide a SHA256SUMS file (or similar) on https://ollama.com/download alongside the tarballs, signed with a public GPG key if possible, and amend the install script to verify the checksums.
Author
Owner

@Muktarsadiq commented on GitHub (Oct 25, 2025):

Quick Question must the verification be handled using a SHA256, cause i was thinking of making use of a digital signature algorithm Ed25519 Minisign.

<!-- gh-comment-id:3446989149 --> @Muktarsadiq commented on GitHub (Oct 25, 2025): Quick Question must the verification be handled using a SHA256, cause i was thinking of making use of a digital signature algorithm Ed25519 [Minisign](https://jedisct1.github.io/minisign/).
Author
Owner

@Muktarsadiq commented on GitHub (Nov 19, 2025):

Hello i never heard back you guys regarding implementing signature verification

<!-- gh-comment-id:3553431119 --> @Muktarsadiq commented on GitHub (Nov 19, 2025): Hello i never heard back you guys regarding implementing signature verification
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#49853