Security Resilience

CVE-2025-0317

Ollama ≤ 0.3.14

Public PoC
Published
20 March 2025
Modified
02 April 2025
CVSS Score v3.1 7.5
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS Score 0.15 97th percentile
Risk Priority 68 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2025-0317 is a high-severity Divide By Zero (CWE-369) vulnerability in Ollama. Its CVSS base score is 7.5 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Application or System Exploitation (T1499.004); ranked in the top 3% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

This vulnerability is AI-related — categorised as NLP and Transformers; in the Data-Related Vulnerabilities risk domain.

The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SA-8 (Security and Privacy Engineering Principles) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

Ollama versions 0.3.14 and earlier contain a division-by-zero vulnerability in the ggufPadding function that processes uploaded GGUF model files. The flaw resides in the model's file-handling component and is tracked as CWE-369, with a CVSS 3.1 score of 7.5 indicating network attack vector, low complexity, and high availability impact.

An unauthenticated remote attacker can exploit the issue by uploading a crafted GGUF model to the Ollama server, triggering the division-by-zero error and crashing the service to achieve denial of service. No authentication or user interaction is required.

The vulnerability was disclosed via a Huntr bounty submission, though the reference contains no explicit details on patches or mitigation steps. EPSS scores remain low at a current value of 0.0209 with a peak of 0.0327, and no information on active exploitation is provided.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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…

more

crash and resulting in a Denial of Service (DoS) attack.

CWE(s)

AI Security AnalysisAI

AI Category
NLP and Transformers
Risk Domain
Data-Related Vulnerabilities
OWASP Top 10 for LLMs 2025
LLM01:2025 Prompt Injection
Classification Reason
Matched keywords: ollama

Related Threats

MITRE ATT&CK Enterprise Techniques

MITRE ATT&CK v20.0

T1499.004 Application or System Exploitation Impact
Adversaries may exploit software vulnerabilities that can cause an application or system to crash and deny availability to users.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2024-8063Same product: Ollama Ollama
CVE-2025-0312Same product: Ollama Ollama
CVE-2025-1975Same product: Ollama Ollama
CVE-2025-0315Same product: Ollama Ollama
CVE-2026-7482Same product: Ollama Ollama
CVE-2024-12055Same product: Ollama Ollama
CVE-2026-7020Same product: Ollama Ollama
CVE-2025-66959Same product: Ollama Ollama
CVE-2025-66960Same product: Ollama Ollama
CVE-2025-44779Same product: Ollama Ollama

Affected Assets

ollama
ollama
≤ 0.3.14

Mitigating Controls

Mitigating Controls (NIST 800-53 r5)

Our mappings, made for this CVE.

Developer testing and evaluation (including static/dynamic analysis) finds divide-by-zero conditions after they have been coded.

Security engineering principles can require safe-arithmetic constructs or explicit guards that keep division operands nonzero.

Validating numeric inputs before use as divisors structurally blocks zero values from reaching division operations.

Mitigating Controls (NIST CSF 2.0)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→CSF cross-walk — links open the control.

PR.PS-06 mostly match
blocks

Secure SDLC practices directly include code analysis, input validation, and testing that prevent divide-by-zero errors.

ID.RA-01 partial match
blocks

Vulnerability identification processes can discover divide-by-zero flaws via static analysis or testing.

PR.PS-02 partial match
blocks

Routine patching and replacement can remediate divide-by-zero bugs present in deployed software.

Mitigating Controls (ISO/IEC 27001:2022 Annex A)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.

finds

Security testing in development can detect divide-by-zero conditions before release.

prevents

Secure coding standards directly require validation to prevent divide-by-zero and similar runtime faults.

prevents

A.8.30 carries its effect through the secure-development practices its contract requires of the supplier (8.25 to 8.29), so it reduces ordinary implementation bugs like divide-by-zero in delivered code the way those practices do, but only partially because the clause depends on those other controls and human practice is fallible.

finds

A.8.8's reach is DISCLOSURE — it sees vulnerabilities via vendor advisories and component inventory. CWE-369 does commonly surface as CVEs (CVE-2007-3268, CVE-2007-2723, CVE-2007-2237 are listed observed examples), so the disclosed share is non-trivial, but the bulk of divide-by-zero instances live in first-party code that A.8.8's disclosure-based programme does not reach.

References