NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Ollama

CVE-2024-8063: Ollama Divide by Zero Vulnerability

highCVSS 3.0 7.5GHSA-2xf2-gjm6-g2c6

Ollama 0.3.3 and earlier crashes with a divide-by-zero when it imports a GGUF model whose `block_count` has a crafted type in the Modelfile. A remote caller who can make the server import such a model can take the service down. The advisory lists no patched version, and the project's issue tracker does not confirm a fix.

Published Mar 20, 2025 · Updated Jun 6, 2026 · Analysis Nov 1, 2026

What an attacker can do

When Ollama builds a model from a GGUF file, it reads values from the file's metadata, including block_count. A crafted type for that field leads the server code to divide by zero while processing the model (CWE-369). The Go runtime panics and the ollama server crashes.

The attacker must get the server to process a hostile GGUF model, for example through the create-model API with a Modelfile that references it. The vector shows network access, no privileges and no user interaction. It scores availability only. The sources describe no code execution and no data exposure.

On a shared Ollama server, the crash drops all loaded models and in-flight requests for every user until the service restarts. An attacker can repeat the request to keep it down. Instances exposed beyond localhost, which Ollama does not protect with authentication by default, are the main concern.

Who is affected

Affected: github.com/ollama/ollama 0.3.3 and earlier, per the advisory. It lists no patched version, so later releases are not confirmed as fixed by this entry. A GitHub issue on the project reports that a later release, 0.5.1, did not fix the listed CVEs, but gives no detail.

ollama --version

For a Go module dependency:

go list -m github.com/ollama/ollama

github.com/ollama/ollama

Ecosystem
Go
Affected
<= 0.3.3
Fixed in
No patched version yet
Check
go list -m github.com/ollama/ollama

How to fix it

The advisory lists no patched version, and the sources give no workaround. A comment on the project's issue 8020 claims a remediation in a newer version, but names no pull request or commit, so treat it as unverified. Check Ollama's release notes for a version that addresses this, and test before relying on it.

Until then:

  • Do not expose the Ollama API to untrusted networks. Put it behind an authenticating reverse proxy.
  • Restrict who can call the model create and import API.
  • Run Ollama under a supervisor that restarts it after a crash.
  • Import GGUF files only from sources you trust.

How to tell if you were hit

Look in the Ollama server log for a Go panic with integer divide by zero and a stack trace in the model loading or conversion code, followed by the process exiting. Check which model create or import request came in just before the crash.

Review your supervisor or container restart history for repeated restarts, and check for GGUF files from untrusted sources in your model directory.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

A divide by zero vulnerability exists in ollama/ollama version v0.3.3. The vulnerability occurs when importing GGUF models with a crafted type for block_count in the Modelfile. This can lead to a denial of service (DoS) condition when the server processes the model, causing it to crash.

Questions

Is there a patched Ollama version for CVE-2024-8063?

The advisory lists none. Versions 0.3.3 and earlier are affected. A comment on the project's issue tracker claims a fix but gives no pull request, so it is unverified.

What triggers the crash?

Importing a GGUF model whose block_count has a crafted type in the Modelfile. The server divides by zero while processing the model.

What is the impact?

Denial of service: the ollama server crashes. The sources report no code execution or data leak.

Is it exploited in the wild?

No source reports exploitation, and it is not in CISA's KEV catalog.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Ollama vulnerabilities

All Ollama entries