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.
Risk Assessment
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.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| ollama | pip | — | No patch |
Do you use ollama? You're affected.
Severity & Risk
Attack Surface
Recommended Action
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.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
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.21%.
Technical Details
NVD Description
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)
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-2025-63389 9.8 ollama: Missing Auth allows unauthenticated access
Same package: ollama CVE-2026-7482 9.1 Ollama: heap OOB read leaks API keys and chat data
Same package: ollama CVE-2026-44007 9.1 vm2: sandbox escape via nesting:true enables RCE
Same package: ollama CVE-2024-37032 8.8 Ollama: path traversal enables RCE via model blob API
Same package: ollama CVE-2024-39720 8.2 Ollama: OOB read in GGUF parser enables remote DoS
Same package: ollama
AI Threat Alert