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.

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
174.6K 1.6K dependents Pushed 3d ago 12% patched ~0d to patch Full package profile →

Do you use Ollama? You're affected.

How severe is it?

CVSS 3.1
7.5 / 10
EPSS
0.6%
chance of exploitation in 30 days
Higher than 46% 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, VulnCheck KEV, CISA SSVC, EPSS, Metasploit, Exploit-DB, trickest/cve, Nuclei templates, and inthewild.io exploitation reports.

What is the 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

What should I do?

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.

What does CISA's SSVC say?

Decision Track*
Exploitation poc
Automatable Yes
Technical Impact partial

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:

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.65%.

What is the AI security impact?

Affected AI Architectures

LLM inference serverslocal AI deploymentsAI agent backendsmodel serving infrastructuredevelopment and staging environments

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

EU AI Act: Article 15
ISO 42001: A.8.3
NIST AI RMF: MANAGE 2.2
OWASP LLM Top 10: LLM04

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

Timeline

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

Related Vulnerabilities