Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malicious GGUF file with OOB tensor offsets
-
DeliverySend POST to /api/create endpoint
-
ExploitTrigger heap OOB read during quantization
-
ExecutionLeaked memory written to model artifact
-
PersistUpload corrupted model via /api/push
-
ImpactExfiltrate credentials/data from attacker registry
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK
1 technique across 1 tactic: Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires Ollama instance configured with OLLAMA_HOST=0.0.0.0 to bind API endpoints to network-accessible interfaces rather than default 127.0.0.1 localhost-only binding. The /api/create and /api/push endpoints must be reachable without authentication, which is the default configuration in upstream Ollama distributions. No special features, protocols, or deployment modes beyond network binding configuration are required. For default localhost-only deployments (127.0.0.1), exploitation is limited to local attackers with access to the host system or applications with SSRF capabilities targeting localhost services. Attack complexity is low (CVSS AC:L) requiring only the ability to upload a crafted GGUF file-no race conditions, cryptographic weaknesses, or complex timing requirements. Limiting factors: network binding configuration determines remote versus local attack surface; no user interaction required (UI:N); no privileges required for unauthenticated endpoints (PR:N). Deployments behind authenticated reverse proxies or network ACLs restricting /api/create access significantly reduce practical exploitability. |
| Impact | Real-world risk is HIGH for exposed deployments and MODERATE overall. CVSS 4.0 score of 8.8 with vector AV:N/AC:L/PR:N/UI:N indicates trivial network exploitation requiring no authentication or user interaction, with high confidentiality and availability impact. The vulnerability enables direct memory disclosure attacks against unauthenticated endpoints. However, attack surface is constrained by deployment configuration: default installations bind to 127.0.0.1 (localhost-only), limiting exposure to local privilege escalation scenarios. The critical risk factor is the documented and widely-adopted OLLAMA_HOST=0.0.0.0 configuration for containerized and multi-user deployments, which the description notes has 'large public-internet exposure observed' in practice. For these exposed instances, the combination of unauthenticated network access, trivial exploit complexity, and high-value leaked data (API keys, credentials, user conversations) creates immediate risk. CVSS availability impact (VA:H) reflects potential DoS through malformed models. No EPSS score, KEV status, or public exploit availability data provided, suggesting discovery during security audit rather than active exploitation. SSVC factors: exploitation requires minimal skill (upload crafted GGUF file), is fully automatable, and has high technical impact (credential theft, data breach). The patch adds file size validation and tensor bounds checks with comprehensive test coverage for truncated tensor scenarios, confirming the vendor's understanding of the attack vector. Priority depends critically on deployment mode: CRITICAL for internet-exposed instances with OLLAMA_HOST=0.0.0.0, MEDIUM for default localhost-only deployments. |
| Exploit ScenarioDerived | An attacker crafts a malicious GGUF model file with tensor metadata declaring offsets and sizes that extend beyond the file's actual byte length. They send an HTTP POST request to the /api/create endpoint on an internet-exposed Ollama instance configured with OLLAMA_HOST=0.0.0.0, uploading the malformed GGUF file. During model quantization, the server's GGUF decoder reads past the allocated heap buffer, inadvertently copying environment variables, API keys, or concurrent users' conversation data into the quantized model artifact. The attacker then uses the /api/push endpoint to upload the memory-corrupted model to their own registry, exfiltrating the leaked credentials and sensitive data for use in follow-on attacks. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – May 04, 2026
Heap out-of-bounds read in Ollama's GGUF model loader (<0.17.1) leaks sensitive memory contents including API keys, environment variables, and concurrent user data when processing maliciously crafted model files. Attackers can trigger the vulnerability by uploading a GGUF file with tensor offsets exceeding file bounds via the unauthenticated /api/create endpoint, then exfiltrate leaked memory through /api/push to attacker-controlled registries. While default deployments bind to localhost only, the widely-adopted OLLAMA_HOST=0.0.0.0 configuration exposes instances to network exploitation. Vendor-released patch available in version 0.17.1 with GitHub commit 88d57d0483cca907e0b23a968c83627a20b21047 adding bounds validation to fs/ggml/gguf.go and server/quantization.go.
Earlier versions of this analysis (1)
Heap out-of-bounds read in Ollama's GGUF model loader (versions <0.17.1) leaks sensitive memory contents including API keys, environment variables, and user conversation data when attackers upload malformed GGUF model files. Exploitation requires no authentication in default upstream configurations. While Ollama binds to localhost by default, the widely-adopted OLLAMA_HOST=0.0.0.0 deployment pattern exposes the vulnerability to remote network attackers. Fixed in version 0.17.1 via bounds validation in the model parser.
RemediationAI
Upgrade immediately to Ollama version 0.17.1 or later, which includes commit 88d57d0483cca907e0b23a968c83627a20b21047 adding file size validation and tensor bounds checking to the GGUF decoder. The patch modifies fs/ggml/gguf.go to validate tensorEnd (tensorOffset + tensor.Offset + tensor.Size) does not exceed file size before read operations, and adds size validation in server/quantization.go to reject undersized tensor data. Download the patched release from https://github.com/ollama/ollama/releases/tag/v0.17.1 and verify the fix via pull request https://github.com/ollama/ollama/pull/14406. For deployments that cannot immediately upgrade: restrict network binding to localhost only by removing OLLAMA_HOST=0.0.0.0 configuration and using default 127.0.0.1 binding (eliminates remote attack vector but does not fix the underlying memory safety issue-local attackers can still trigger OOB reads). Deploy a reverse proxy with authentication (nginx, Caddy, Traefik) in front of Ollama API endpoints to enforce access controls (adds authentication layer but introduces latency and operational complexity; does not prevent authenticated attackers from exploiting the heap read). Implement network-level restrictions allowing only trusted IP ranges to access ports 11434/tcp (default Ollama port) via firewall rules or security groups (reduces exposure but requires maintaining IP allowlists and breaks dynamic client scenarios). Monitor /api/create and /api/push endpoint access logs for unusual model upload patterns or large model artifacts being pushed to unexpected registries (detective control only-does not prevent exploitation). All workarounds are partial mitigations; upgrading to 0.17.1 is the only complete remediation.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in go, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Ollama is a model serving platform that loads machine learning models in GGUF (GPT-Generated Unified Format) container format. The vulnerability affects the GGUF decoder in fs/ggml/gguf.go and quantization logic in server/quantization.go. When processing tensor metadata during model import, the code reads tensor data from attacker-controlled offsets without validating that declared offset+size falls within file boundaries. CWE-125 (Out-of-bounds Read) occurs when the declared tensor offset and size exceed the actual file length, causing io.ReadSeeker operations to read uninitialized heap memory during WriteTo() calls. The leaked memory region may contain residual data from prior allocations including environment variables (OLLAMA_API_KEY, cloud credentials), system prompts from the model serving context, and conversation history from concurrent users sharing the same process space. The vulnerability chain spans two phases: first triggering the OOB read during /api/create processing, then exfiltrating the corrupted model artifact containing leaked memory through /api/push to an external registry under attacker control.
Know when Ollama gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:H/SC:N/SI:N/SA:N/AU:Y/R:A/V:D/RE:L/U:Red
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
Primary rating from Vendor (Echo).
CVSS VectorVendor: Echo
Lifecycle Timeline
5DescriptionCVE.org
Ollama before 0.17.1 contains a heap out-of-bounds read vulnerability in the GGUF model loader. The /api/create endpoint accepts an attacker-supplied GGUF file in which the declared tensor offset and size exceed the file's actual length; during quantization in fs/ggml/gguf.go and server/quantization.go (WriteTo()), the server reads past the allocated heap buffer. The leaked memory contents may include environment variables, API keys, system prompts, and concurrent users' conversation data, and can be exfiltrated by uploading the resulting model artifact through the /api/push endpoint to an attacker-controlled registry. The /api/create and /api/push endpoints have no authentication in the upstream distribution. Default deployments bind to 127.0.0.1, but the documented OLLAMA_HOST=0.0.0.0 configuration is widely used in practice (large public-internet exposure observed).
Executive ViewAI
Ollama versions before 0.17.1 contain a critical heap memory leak vulnerability in the GGUF model loader that allows unauthenticated attackers to extract sensitive data including API keys and environment variables by uploading malicious model files. Organizations running Ollama with network-accessible endpoints (particularly those using OLLAMA_HOST=0.0.0.0) face immediate risk of credential compromise and unauthorized access to downstream systems.
If immediate patching is not feasible: (1) Restrict network access to Ollama endpoints using firewall rules or reverse proxy authentication-bind OLLAMA_HOST to localhost (127.0.0.1) only unless network access is mandatory; (2) disable or restrict the /api/create endpoint if model uploads are not required; (3) monitor /api/push requests for exfiltration to external registries; (4) immediately rotate all API keys, secrets, and environment variables that may reside in process memory. Apply vendor patch (version 0.17.1 or later) as primary remediation.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Ollama before 0.1.34 does not validate the format of the digest (sha256 with 64 hex digits) when getting the model path,
Remote code execution in Ollama for Windows (versions 0.12.10 through 0.17.5) lets an attacker who can influence HTTP up
Silent auto-update code execution in Ollama for Windows (versions 0.12.10 through 0.17.5) stems from an update-verificat
Remote denial of service in Ollama (HEAD f0078ae) allows unauthenticated attackers to crash the entire server by uploadi
Denial of service in Ollama's multi-modal image processing (versions 0.11.5-rc0 through 0.13.5) lets remote attackers cr
An issue was discovered in Ollama before 0.1.46. Rated high severity (CVSS 8.2), this vulnerability is remotely exploita
A vulnerability in the Ollama server version 0.5.11 allows a malicious user to cause a Denial of Service (DoS) attack by
Information disclosure in Ollama's model quantization engine (confirmed affected in v0.13.5) allows remote, unauthentica
A vulnerability in ollama/ollama versions <=0.3.14 allows a malicious user to upload and create a customized GGUF model
An issue in ollama v.0.12.10 allows a remote attacker to cause a denial of service via the fs/ggml/gguf.go, function rea
An issue in ollama v.0.12.10 allows a remote attacker to cause a denial of service via the GGUF decoder [CVSS 7.5 HIGH]
A divide by zero vulnerability exists in ollama/ollama version v0.3.3. Rated high severity (CVSS 7.5), this vulnerabilit
EUVD-2026-26949
GHSA-x8qc-fggm-mpqg
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB