CVE-2025-0317: Ollama: DoS via malicious GGUF model file upload

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

Any Ollama instance ≤0.3.14 with model upload access can be crashed by an unauthenticated attacker with a single crafted GGUF file — no credentials, no complexity. Upgrade to a version beyond 0.3.14 immediately and audit network exposure of your Ollama API endpoints. If patching is not feasible today, block the model creation endpoint at the network layer as an interim control.

What is the risk?

High exploitability given the CVSS 7.5 profile: unauthenticated, network-reachable, low complexity. Organizations exposing Ollama for team-wide LLM access, internal portals, or developer tooling are directly at risk. Impact is scoped to availability — no data exfiltration or code execution path — but persistent crashes disrupt AI-dependent workflows, can trigger incident response costs, and may signal active reconnaissance of the AI stack.

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
13.5%
chance of exploitation in 30 days
Higher than 96% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Trivial
Exploitation Confidence
medium
CISA SSVC: Public PoC
Public PoC indexed (trickest/cve)
EPSS exploit prediction: 13%
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?

5 steps
  1. Upgrade Ollama to a version beyond 0.3.14 immediately — this is the primary fix.

  2. If patching is delayed, block external access to the Ollama API (default port 11434) at the firewall or ingress layer.

  3. Restrict the model creation/upload endpoint to authenticated, authorized users via a reverse proxy (nginx/Caddy with auth middleware).

  4. Monitor Ollama process restarts as an indicator of exploitation attempts — unexpected crash loops warrant investigation.

  5. Audit all publicly exposed Ollama instances using your asset inventory; check Shodan exposure for your IP ranges.

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.9.3 - AI system security
NIST AI RMF
MANAGE-2.2 - Risks or incidents are responded to and recovered from
OWASP LLM Top 10
LLM04 - Model Denial of Service

Frequently Asked Questions

What is CVE-2025-0317?

Any Ollama instance ≤0.3.14 with model upload access can be crashed by an unauthenticated attacker with a single crafted GGUF file — no credentials, no complexity. Upgrade to a version beyond 0.3.14 immediately and audit network exposure of your Ollama API endpoints. If patching is not feasible today, block the model creation endpoint at the network layer as an interim control.

Is CVE-2025-0317 actively exploited?

Proof-of-concept exploit code is publicly available for CVE-2025-0317, increasing the risk of exploitation.

How to fix CVE-2025-0317?

1. Upgrade Ollama to a version beyond 0.3.14 immediately — this is the primary fix. 2. If patching is delayed, block external access to the Ollama API (default port 11434) at the firewall or ingress layer. 3. Restrict the model creation/upload endpoint to authenticated, authorized users via a reverse proxy (nginx/Caddy with auth middleware). 4. Monitor Ollama process restarts as an indicator of exploitation attempts — unexpected crash loops warrant investigation. 5. Audit all publicly exposed Ollama instances using your asset inventory; check Shodan exposure for your IP ranges.

What systems are affected by CVE-2025-0317?

This vulnerability affects the following AI/ML architecture patterns: LLM inference servers, self-hosted AI platforms, local model serving, AI developer environments, internal AI assistants.

What is the CVSS score for CVE-2025-0317?

CVE-2025-0317 has a CVSS v3.1 base score of 7.5 (HIGH). The EPSS exploitation probability is 13.48%.

What is the AI security impact?

Affected AI Architectures

LLM inference serversself-hosted AI platformslocal model servingAI developer environmentsinternal AI assistants

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.9.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 upload and create a customized GGUF model file on the Ollama server. This can lead to a division by zero error in the ggufPadding function, causing the server to crash and resulting in a Denial of Service (DoS) attack.

Exploitation Scenario

Attacker scans for Ollama instances on port 11434 (Shodan has thousands indexed) or enumerates an internal corporate network. They craft a GGUF model file with malformed padding parameters — a single arithmetic error in the ggufPadding function triggers a division by zero. With one unauthenticated POST to the Ollama model creation API, the server process crashes. Since no authentication is required and the crash is deterministic, the attacker can loop this after every restart, achieving persistent denial of the AI inference service with minimal tooling.

Weaknesses (CWE)

CWE-369 — Divide By Zero: The product divides a value by zero.

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
April 2, 2025
First Seen
March 20, 2025

Related Vulnerabilities