CVE-2025-0312: Ollama: null pointer DoS via malicious GGUF model upload
HIGH PoC AVAILABLE CISA: TRACK*Any Ollama instance reachable by untrusted users is at risk of complete service outage — no credentials required, just a crafted model file. Patch immediately to a version above 0.3.14 or restrict model upload access at the network layer. If Ollama backs production AI workloads, treat this as P1 until patched.
What is the risk?
High risk for internet-exposed or multi-user Ollama deployments. CVSS 7.5 with network vector, zero complexity, and no authentication required makes this trivially exploitable by any actor with network access to the Ollama API. Impact is availability-only (A:H), but full service disruption of LLM inference infrastructure can halt AI-dependent business processes. Attack surface is broad given Ollama's wide adoption across enterprise AI deployments and developer environments.
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| Ollama | pip | — | No patch |
Do you use Ollama? You're affected.
How severe is it?
What is the attack surface?
What should I do?
6 steps-
Upgrade Ollama to a version above 0.3.14 immediately.
-
If patching is delayed, restrict the Ollama API (default port 11434) to trusted IP ranges or localhost-only via firewall rules.
-
Disable or restrict the model create and push endpoints for untrusted users.
-
Validate GGUF file integrity using trusted checksums before loading.
-
Monitor for unexpected Ollama process crashes as an indicator of exploitation attempts in your logs or process supervisor output.
-
Run Ollama in a container with automatic restart policies to reduce availability impact until patched.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2025-0312?
Any Ollama instance reachable by untrusted users is at risk of complete service outage — no credentials required, just a crafted model file. Patch immediately to a version above 0.3.14 or restrict model upload access at the network layer. If Ollama backs production AI workloads, treat this as P1 until patched.
Is CVE-2025-0312 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2025-0312, increasing the risk of exploitation.
How to fix CVE-2025-0312?
1. Upgrade Ollama to a version above 0.3.14 immediately. 2. If patching is delayed, restrict the Ollama API (default port 11434) to trusted IP ranges or localhost-only via firewall rules. 3. Disable or restrict the model create and push endpoints for untrusted users. 4. Validate GGUF file integrity using trusted checksums before loading. 5. Monitor for unexpected Ollama process crashes as an indicator of exploitation attempts in your logs or process supervisor output. 6. Run Ollama in a container with automatic restart policies to reduce availability impact until patched.
What systems are affected by CVE-2025-0312?
This vulnerability affects the following AI/ML architecture patterns: LLM inference servers, local AI deployments, AI agent backends, model serving infrastructure, development and staging environments.
What is the CVSS score for CVE-2025-0312?
CVE-2025-0312 has a CVSS v3.1 base score of 7.5 (HIGH). The EPSS exploitation probability is 0.65%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0011.000 Unsafe AI Artifacts AML.T0029 Denial of AI Service AML.T0049 Exploit Public-Facing Application AML.T0076 Corrupt AI Model Compliance Controls Affected
What are the technical details?
Original Advisory
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.
Exploitation Scenario
An adversary with network access to an Ollama server — whether a shared team deployment, an internet-exposed instance, or a compromised internal network segment — crafts a GGUF model file containing a null pointer in critical model metadata. They submit it via the Ollama REST API (/api/create or model import endpoint). When Ollama's GGUF parser dereferences the null pointer without bounds checking, the server process crashes immediately, taking down all inference capabilities. Because many Ollama deployments have no authentication enabled by default, this can be triggered anonymously over the network. A persistent adversary can loop this to maintain a continuous DoS condition against AI-dependent services.
Weaknesses (CWE)
CWE-476 — NULL Pointer Dereference: The product dereferences a pointer that it expects to be valid but is NULL.
- [Implementation] For any pointers that could have been modified or provided from a function that can return NULL, check the pointer for NULL before use. When working with a multithreaded or otherwise asynchronous environment, ensure that proper locking APIs are used to lock before the check, and unlock when it has finished [REF-1484].
- [Requirements] Select a programming language that is not susceptible to these issues.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H References
- huntr.com/bounties/522c87b6-a7ac-41b2-84f3-62fd58921f21 Exploit 3rd Party
Timeline
Related Vulnerabilities
CVE-2026-46339 10.0 9router: unauthenticated RCE exposes LLM API keys
Same package: ollama CVE-2026-42248 9.8 Ollama: silent auto-update bypasses signature check on Windows
Same package: ollama CVE-2025-63389 9.8 ollama: Missing Auth allows unauthenticated access
Same package: ollama CVE-2026-42249 9.8 Ollama: path traversal + unsigned update = silent RCE
Same package: ollama CVE-2026-7482 9.1 Ollama: heap OOB read leaks API keys and chat data
Same package: ollama