CVE-2025-0312: Ollama: null pointer DoS via malicious GGUF model upload

HIGH PoC AVAILABLE CISA: TRACK*
Published March 20, 2025
CISO Take

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
170.6K 1.4K dependents Pushed 6d ago 5% patched ~0d to patch Full package profile →

Do you use ollama? You're affected.

Severity & Risk

CVSS 3.1
7.5 / 10
EPSS
0.2%
chance of exploitation in 30 days
Higher than 43% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Trivial
Exploitation Confidence
medium
CISA SSVC: Public PoC
Public PoC indexed (trickest/cve)
Composite signal derived from CISA KEV, CISA SSVC, EPSS, trickest/cve, and Nuclei templates.

Attack Surface

AV AC PR UI S C I A
AV Network
AC Low
PR None
UI None
S Unchanged
C None
I None
A High

Recommended Action

6 steps
  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.

CISA SSVC Assessment

Decision Track*
Exploitation poc
Automatable Yes
Technical Impact partial

Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.

Classification

Compliance Impact

This CVE is relevant to:

EU AI Act
Article 15 - Accuracy, Robustness and Cybersecurity
ISO 42001
A.8.3 - AI System Security
NIST AI RMF
MANAGE 2.2 - Mechanisms to Sustain and Improve AI Risk Management
OWASP LLM Top 10
LLM04 - Model Denial of Service

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.

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Timeline

Published
March 20, 2025
Last Modified
March 28, 2025
First Seen
March 20, 2025

Related Vulnerabilities