CVE-2025-0317: Ollama: DoS via malicious GGUF model file upload
HIGH PoC AVAILABLE CISA: TRACK*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 |
Do you use Ollama? You're affected.
How severe is it?
What is the attack surface?
What should I do?
5 steps-
Upgrade Ollama to a version beyond 0.3.14 immediately — this is the primary fix.
-
If patching is delayed, block external access to the Ollama API (default port 11434) at the firewall or ingress layer.
-
Restrict the model creation/upload endpoint to authenticated, authorized users via a reverse proxy (nginx/Caddy with auth middleware).
-
Monitor Ollama process restarts as an indicator of exploitation attempts — unexpected crash loops warrant investigation.
-
Audit all publicly exposed Ollama instances using your asset inventory; check Shodan exposure for your IP ranges.
What does CISA's SSVC say?
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:
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
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
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 References
- huntr.com/bounties/a9951bca-9bd8-49b2-b143-4cd4219f9fa0 Exploit 3rd Party
Timeline
Related Vulnerabilities
CVE-2026-46339 10.0 9router: unauthenticated RCE exposes LLM API keys
Same package: ollama CVE-2026-42248 9.8 Ollama: silent auto-update bypasses signature check on Windows
Same package: ollama CVE-2025-63389 9.8 ollama: Missing Auth allows unauthenticated access
Same package: ollama CVE-2026-42249 9.8 Ollama: path traversal + unsigned update = silent RCE
Same package: ollama CVE-2026-7482 9.1 Ollama: heap OOB read leaks API keys and chat data
Same package: ollama