Skip to content
HighVulnerability

CVE-2024-39720: Ollama crash via malformed GGUF file in CreateModel route

Identifier
CVE-2024-39720
Published
Record updated
View JSON
Affected
  • github.com/ollama/ollama < 0.1.46
Fixed in
0.1.46
  • released June 21, 2024, 133 days before disclosure
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
2.4%

Summary

CVE-2024-39720 affects Ollama before 0.1.46. An attacker can upload a malformed GGUF file of just 4 bytes, starting with the GGUF custom magic header, using two HTTP requests. By pointing a custom Modelfile's FROM statement at that blob, the attacker crashes the application through the CreateModel route with a segmentation fault (SIGSEGV). The weakness is classified as CWE-125, Out-of-bounds Read.

Mitigation

The source links a fix commit in the ollama/ollama repository comparing v0.1.45 to v0.1.46, but it does not state the fix in words. Its stated mitigation is therefore: N/A -- no mitigation discussed in source.