Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/ollama/ollama
  4. ›
  5. CVE-2024-39720

CVE-2024-39720: Ollama Out-of-bounds Read

October 31, 2024 (updated December 12, 2024)

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).

References

  • github.com/advisories/GHSA-95j2-w8x7-hm88
  • github.com/ollama/ollama
  • github.com/ollama/ollama/compare/v0.1.45...v0.1.46
  • nvd.nist.gov/vuln/detail/CVE-2024-39720
  • oligo.security/blog/more-models-more-probllms
  • oligosecurity.webflow.io/blog/more-models-more-probllms
  • pkg.go.dev/vuln/GO-2024-3245

Code Behaviors & Features

Detect and mitigate CVE-2024-39720 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.1.46

Fixed versions

  • 0.1.46

Solution

Upgrade to version 0.1.46 or above.

Impact 8.2 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-125: Out-of-bounds Read

Source file

go/github.com/ollama/ollama/CVE-2024-39720.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:39 +0000.