Out-of-bounds Read in Ollama
CVE-2024-39720
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).
Vulnerability class: Buffer Overflow
Published · last modified .
CVSS v3 metric
CVSS v3 base score 8.2 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H.
EPSS exploit prediction
EPSS 0.024, 84.6th percentile (scored ); unchanged over 30 days. About EPSS.
Affected products
Weakness classification (CWE)
Public exploits and proof-of-concept code
Also mentioned in 3 other repositories (datawhalechina/handy-ollama, fkie-cad/nvd-json-data-feeds, wowtalon/LLM-Security). These reference the CVE in a list, notes or a scanner and are not exploit code for it.
References
- github.com/ollama/ollama/compare/v0.1.45...v0.1.46 (Product)
- oligo.security/blog/more-models-more-probllms (Exploit, Third Party Advisory)