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

CVE-2024-12886: Ollama Vulnerable to Denial of Service (DoS) via Crafted GZIP

highCVSS 3.0 7.5GHSA-v464-r2r9-www7

Ollama 0.3.14 and earlier can be crashed by a malicious registry or API server that answers with a gzip bomb. The `makeRequestWithRetry` and `getAuthorizationToken` functions read the whole response with `io.ReadAll`, so a small compressed reply expands until the process runs out of memory. The advisory lists no patched version.

Published Mar 20, 2025 · Updated Oct 15, 2025 · Analysis Nov 1, 2026

What an attacker can do

Ollama acts as an HTTP client when it pulls models or fetches an authorization token from a registry. In makeRequestWithRetry and getAuthorizationToken it reads the response body with io.ReadAll, with no size limit. If the remote server replies with a gzip bomb, a small payload that inflates to a very large one, the read grows memory until the operating system kills the ollama process (CWE-400, CWE-409).

The attacker must control the server Ollama talks to. That means a registry host you pull from, or a server you are tricked into pointing at, for example through a model name that includes an attacker-controlled host. The vector shows no privileges and no user interaction, and an availability-only impact.

The crash drops every loaded model and in-flight request on that Ollama instance. On a shared inference server that takes the service down for all users until it is restarted. The sources describe no data exposure or code execution.

Who is affected

Affected: github.com/ollama/ollama 0.3.14 and earlier, per the advisory. The advisory lists no patched version, so later releases are not confirmed as fixed.

ollama --version

For a Go module dependency:

go list -m github.com/ollama/ollama

Any instance that pulls models from a registry or host you do not control is the exposed configuration.

github.com/ollama/ollama

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

How to fix it

There is no patched version listed in the advisory, and the sources give no workaround. Check the Ollama release notes for a newer release before relying on this entry, because the advisory data may lag.

Until then, reduce exposure:

  • Pull models only from registries you trust. Do not pull from user-supplied hosts.
  • Run Ollama under a process supervisor that restarts it, and set a memory limit so a bomb kills only the Ollama process.
  • Restrict who can call the pull API on your server.

How to tell if you were hit

Look for the ollama process exiting with an out-of-memory kill. On Linux, check dmesg or journalctl -k for Out of memory: Killed process naming ollama. Sudden memory growth during a model pull or token request is the other sign.

Check server logs for pulls or authorization requests to hosts you do not recognise just before the crash. Review your container or systemd restart history for repeated restarts.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

An Out-Of-Memory (OOM) vulnerability exists in the ollama server version 0.3.14. This vulnerability can be triggered when a malicious API server responds with a gzip bomb HTTP response, leading to the ollama server crashing. The vulnerability is present in the makeRequestWithRetry and getAuthorizationToken functions, which use io.ReadAll to read the response body. This can result in excessive memory usage and a Denial of Service (DoS) condition.

Questions

Is there a patched version of Ollama for CVE-2024-12886?

The advisory lists none. Affected versions are 0.3.14 and earlier. Check Ollama's release notes for newer builds.

Who can trigger it?

Whoever controls the server Ollama makes a request to, such as a malicious registry or API host. They reply with a gzip bomb to the request.

What is the impact?

Denial of service only. The ollama process runs out of memory and 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