CVE-2025-0312: Ollama Denial of Service (DoS) via Null Pointer Dereference
Ollama 0.3.14 and earlier crashes when it creates a model from a specially built GGUF file. An unchecked null pointer is dereferenced, so one upload takes the server down. The advisory data lists no patched version.
Published Mar 20, 2025 · Updated Mar 28, 2025 · Analysis Nov 1, 2026
What an attacker can do
An attacker builds a custom GGUF model file, uploads it to the Ollama server and asks the server to create the model. During creation the code dereferences a null pointer without checking it. The Go process panics and exits. The CVSS vector is network, no privileges, no user interaction, availability only.
Ollama has no built-in authentication. Many installs bind to a network address so that other machines, containers or agents can use them. Anyone who can reach that port can upload a blob and trigger model creation, so one request can stop every user of the server. The sources do not report data exposure or code execution. They do not name the exact function that fails.
Who is affected
The Go module github.com/ollama/ollama at 0.3.14 and earlier. Servers that are only reachable from localhost are much harder to hit, but any host with the API exposed on a LAN or the internet is in scope.
Check the version:
ollama --versionFor a Go build, go list -m github.com/ollama/ollama shows the module version. Also check what address OLLAMA_HOST binds to.
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
The advisory data lists no patched version, and the sources give no fix commit. Upgrade to the newest Ollama release and check its notes for GGUF parsing fixes.
In the meantime, do not expose the Ollama API to untrusted networks. Put it behind an authenticating reverse proxy that blocks the model create and blob upload routes for people who do not need them, and run it under a supervisor that restarts it after a crash.
How to tell if you were hit
Look for the Ollama process exiting with a Go panic mentioning a nil pointer dereference shortly after a model create request. Server logs show requests to the create and blob upload endpoints from an address that should not manage models. Repeated restarts of the service without a matching deploy are a sign.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
A vulnerability in ollama/ollama versions <=0.3.14 allows a malicious user to create a customized GGUF model file that, when uploaded and created on the Ollama server, can cause a crash due to an unchecked null pointer dereference. This can lead to a Denial of Service (DoS) attack via remote network.
Questions
- Does CVE-2025-0312 need authentication?
No. The CVSS vector has no privileges required. Ollama has no login of its own, so reachability of the port is the real barrier.
- Is there a fixed Ollama version for CVE-2025-0312?
The advisory lists none. It marks 0.3.14 and earlier as vulnerable. Run the latest release and check its notes.
- Can this lead to code execution?
The sources describe only a crash from a null pointer dereference. They report availability impact and nothing more.
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 entriesCVE-2026-7482
Ollama contains a heap out-of-bounds read vulnerability in the GGUF model loader
high9.1May 4, 2026CVE-2026-7020
Ollama is Vulnerable to Path Traversal
low5.6No fixApr 26, 2026CVE-2025-63389
Ollama Platform has missing authentication enabling attackers to perform model management operations
critical9.3No fixDec 18, 2025CVE-2025-44779
Ollama allows deletion of arbitrary files
medium6.6Aug 7, 2025CVE-2025-51471
Ollama vulnerable to Cross-Domain Token Exposure
medium6.9No fixJul 22, 2025CVE-2025-1975
Ollama Server Vulnerable to Denial of Service (DoS) Attack
high7.5No fixMay 16, 2025
