CVE-2024-39720: Ollama: OOB read in GGUF parser enables remote DoS
HIGH PoC AVAILABLE CISA: TRACK*Any internet-exposed Ollama instance running below 0.1.46 can be crashed with two unauthenticated HTTP requests — no credentials, no prior access needed. The CVSS C:L score hints at a potential partial memory disclosure beyond pure DoS, warranting urgent patching. Patch immediately to 0.1.46+ or, at minimum, bind Ollama to localhost and firewall the port.
Risk Assessment
High risk. The combination of no authentication requirement, low attack complexity, and network-reachable attack vector makes this trivially weaponizable. Ollama defaults to listening on all interfaces in many deployment guides, meaning developer workstations, internal MLOps platforms, and cloud-hosted inference nodes are commonly exposed. The out-of-bounds read (CWE-125) in a parser that processes attacker-supplied binary data is a class of vulnerability historically associated with escalation to RCE; the current confirmed impact is crash/DoS, but memory disclosure cannot be ruled out without deeper analysis.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| ollama | pip | — | No patch |
Do you use ollama? You're affected.
Severity & Risk
Attack Surface
Recommended Action
5 steps-
Patch immediately
Upgrade to Ollama 0.1.46 or later — the fix is available and the diff is public.
-
Network isolation (if patching is delayed): Bind Ollama to 127.0.0.1 only (
OLLAMA_HOST=127.0.0.1); never expose port 11434 directly to the internet or untrusted networks. -
Reverse proxy with authentication
Place Ollama behind a proxy (nginx, Caddy) that enforces authentication before any API access.
-
Detection
Alert on SIGSEGV/crash signals in Ollama process logs; monitor for unusual POST requests to
/api/blobs/followed by/api/createfrom unexpected sources. -
Inventory
Audit all internal deployments — Ollama is commonly spun up ad-hoc by developers and may exist outside formal asset tracking.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2024-39720?
Any internet-exposed Ollama instance running below 0.1.46 can be crashed with two unauthenticated HTTP requests — no credentials, no prior access needed. The CVSS C:L score hints at a potential partial memory disclosure beyond pure DoS, warranting urgent patching. Patch immediately to 0.1.46+ or, at minimum, bind Ollama to localhost and firewall the port.
Is CVE-2024-39720 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2024-39720, increasing the risk of exploitation.
How to fix CVE-2024-39720?
1. **Patch immediately**: Upgrade to Ollama 0.1.46 or later — the fix is available and the diff is public. 2. **Network isolation** (if patching is delayed): Bind Ollama to 127.0.0.1 only (`OLLAMA_HOST=127.0.0.1`); never expose port 11434 directly to the internet or untrusted networks. 3. **Reverse proxy with authentication**: Place Ollama behind a proxy (nginx, Caddy) that enforces authentication before any API access. 4. **Detection**: Alert on SIGSEGV/crash signals in Ollama process logs; monitor for unusual POST requests to `/api/blobs/` followed by `/api/create` from unexpected sources. 5. **Inventory**: Audit all internal deployments — Ollama is commonly spun up ad-hoc by developers and may exist outside formal asset tracking.
What systems are affected by CVE-2024-39720?
This vulnerability affects the following AI/ML architecture patterns: local LLM inference, model serving, self-hosted AI infrastructure, developer AI workstations, on-premise MLOps platforms.
What is the CVSS score for CVE-2024-39720?
CVE-2024-39720 has a CVSS v3.1 base score of 8.2 (HIGH). The EPSS exploitation probability is 0.34%.
Technical Details
NVD Description
An issue was discovered in Ollama before 0.1.46. An attacker can use two HTTP requests to upload a malformed GGUF file containing just 4 bytes starting with the GGUF custom magic header. By leveraging a custom Modelfile that includes a FROM statement pointing to the attacker-controlled blob file, the attacker can crash the application through the CreateModel route, leading to a segmentation fault (signal SIGSEGV: segmentation violation).
Exploitation Scenario
An attacker discovers an exposed Ollama API (port 11434) via Shodan or internal network scan. They send two HTTP requests: (1) `POST /api/blobs/sha256:<hash>` with a 4-byte GGUF magic header payload to register a malformed blob, and (2) `POST /api/create` with a Modelfile body containing `FROM @sha256:<hash>` pointing to the malicious blob. Ollama's GGUF parser dereferences a pointer based on the (missing/invalid) header fields, triggering a SIGSEGV and crashing the process. In environments where Ollama runs without a process supervisor, this permanently disables AI inference capability until manual restart. A PoC is publicly documented in the Oligo Security research post, lowering the barrier to exploitation to near-zero.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H References
- github.com/ollama/ollama/compare/v0.1.45...v0.1.46 Product
- oligo.security/blog/more-models-more-probllms Exploit 3rd Party
- github.com/datawhalechina/handy-ollama Exploit
- github.com/fkie-cad/nvd-json-data-feeds Exploit
- github.com/wowtalon/LLM-Security Exploit
Timeline
Related Vulnerabilities
CVE-2025-63389 9.8 ollama: Missing Auth allows unauthenticated access
Same package: ollama CVE-2026-44007 9.1 vm2: sandbox escape via nesting:true enables RCE
Same package: ollama CVE-2026-7482 9.1 Ollama: heap OOB read leaks API keys and chat data
Same package: ollama CVE-2024-37032 8.8 Ollama: path traversal enables RCE via model blob API
Same package: ollama CVE-2024-45436 7.5 Ollama: ZIP path traversal exposes host filesystem
Same package: ollama
AI Threat Alert