CVE-2024-39720
Ollama vulnerability analysis and mitigation

Overview

An out-of-bounds read vulnerability (CVE-2024-39720) was discovered in Ollama versions before 0.1.46. The vulnerability affects the CreateModel route of the application, which is one of the leading open-source frameworks for running AI models. This security flaw was identified and reported by Oligo Security's research team as part of a broader security assessment that uncovered multiple vulnerabilities in the framework (Oligo Blog).

Technical details

The vulnerability allows an attacker to exploit the system using two HTTP requests to upload a malformed GGUF file containing just 4 bytes that start with the GGUF custom magic header. The attack vector involves leveraging a custom Modelfile that includes a FROM statement pointing to the attacker-controlled blob file. When exploited, this leads to a segmentation fault (signal SIGSEGV: segmentation violation) through the CreateModel route. The vulnerability has been assigned a CVSS v3.1 base score of 8.2 (HIGH) with the vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H and is classified as CWE-125 (Out-of-bounds Read) (NVD).

Impact

When successfully exploited, this vulnerability results in a denial of service (DoS) condition by causing the application to crash. The impact is particularly significant given that Ollama is widely used in enterprise environments for deploying AI models, with approximately 10,000 internet-facing instances identified, of which about 25% were found to be vulnerable (Oligo Blog).

Mitigation and workarounds

The vulnerability has been patched in Ollama version 0.1.46. Organizations running affected versions should immediately upgrade to the patched version. For systems that cannot be immediately updated, it is recommended to filter which endpoints are exposed to end-users using a web application proxy or load balancer (Oligo Blog).

Community reactions

The discovery of this vulnerability, along with other security flaws in Ollama, has raised significant concerns in the cybersecurity community, particularly given the framework's increasing adoption in enterprise environments. The vulnerability disclosure was handled responsibly, with Ollama's maintainers being highly cooperative in quickly addressing the reported issues (Oligo Blog).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

“Best User Experience I have ever seen, provides full visibility to cloud workloads.”
David EstlickCISO
“Wiz provides a single pane of glass to see what is going on in our cloud environments.”
Adam FletcherChief Security Officer
“We know that if Wiz identifies something as critical, it actually is.”
Greg PoniatowskiHead of Threat and Vulnerability Management