CVE-2024-39720 — ollama
HIGHCVE-2024-39720 is a high-severity (CVSS 8.2) Out-of-bounds Read vulnerability in github.com/ollama/ollama. A fix is available for github.com/ollama/ollama — see the affected versions and patch details below.
Ollama Out-of-bounds Read
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
Exploitation and automatability from CISA’s SSVC triage for CVE-2024-39720.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
github.com/ollama/ollamaReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
An issue was discovered in Ollama before 0.1.46. An attacker can use two HTTP requests to upload a malformed GGUF file containing just 4 bytes starting with the GGUF custom magic header. By leveraging a custom Modelfile that includes a FROM statement pointing to the attacker-controlled blob file, the attacker can crash the application through the CreateModel route, leading to a segmentation fault (signal SIGSEGV: segmentation violation).
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/ollama/ollama | all versions | 0.1.46go get github.com/ollama/ollama@v0.1.46 |
Affected Products
ollamaollamaDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/ollama/ollama, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/ollama/ollama to 0.1.46 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2024-39720 is resolved across your whole dependency graph.
Workarounds
Stop feeding it untrusted input: reject or quarantine files and payloads from unverified sources until you can upgrade, restrict accepted formats to the ones you actually need, and run the parsing or decoding step in a least-privileged sandbox or short-lived worker so a crash or corrupted read cannot reach the rest of the process.
Frequently Asked Questions
Is CVE-2024-39720 in your dependencies?
Find it across Go, including transitive dependencies.