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.
What is the risk?
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.
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-
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.
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-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 2.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 Compliance Controls Affected
What are the technical details?
Original Advisory
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)
CWE-125 — Out-of-bounds Read: The product reads data past the end, or before the beginning, of the intended buffer.
- [Implementation] Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylis
- [Architecture and Design] Use a language that provides appropriate memory abstractions.
Source: MITRE CWE corpus.
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-2026-46339 10.0 9router: unauthenticated RCE exposes LLM API keys
Same package: ollama CVE-2026-42249 9.8 Ollama: path traversal + unsigned update = silent RCE
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-7482 9.1 Ollama: heap OOB read leaks API keys and chat data
Same package: ollama