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.

Risk Assessment

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.

Affected Systems

Package Ecosystem Vulnerable Range Patched
ollama pip No patch
171.1K 1.5K dependents Pushed today 4% patched ~0d to patch Full package profile →

Do you use ollama? You're affected.

Severity & Risk

CVSS 3.1
7.5 / 10
EPSS
2.9%
chance of exploitation in 30 days
Higher than 86% 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

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.

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

Technical Details

NVD Description

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.

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